simplify a nullity check