How to check for null in the operator== method? You can also use (object)a == null use System.Object.ReferenceEquals(a, null)