Perform null pointer comparison properly