Adding nullObject and undefinedObjects functions as predicated to check if var is null or undefined