If grpc.DialContext() fails, a nil connection is returned. Check the error before calling conn.Close().