I think this should read `eitherIsNull || (bothAreValues && !(a == b || bothInDomain))`