Fix inverted NULL test