Проверьте, нет ли переменная.
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))))