null is of type of object. Check if null first