Test For Null Object
In Python, the null object is the singleton None.
Here is a python example that shows how to test if a reference is None (null):
Source: (example.py)
def getNone():
return None
foo = getNone()
if foo is None:
print("foo is none")
Output:
$ python example.py
foo is none