nullity check not required when using instanceOf in equals