Why nobody had mentioned the Assigned() function? It is what is intended to check if an object/pointer is not nil in Pascal, *not* the "is" operator.
Using "is" for that purpose is a big overkill. Its purpose is to check if the object A's class is equal to or descendant of the given class.