added a new method to check for "null"