Compruebe si la variable es ninguna
a = None
b = 5
print((a, isinstance(a, type(None))))
print((b, isinstance(b, type(None))))
Real Raccoon
a = None
b = 5
print((a, isinstance(a, type(None))))
print((b, isinstance(b, type(None))))