fix nullity check