I am doing a loop and setting a variable but I need to know if it is NoneType.
get_background = wb.colour_map[bgc]
if isinstance(get_background, None):
#do stuff
Getting `typeerror: isinstance () arg 2 must be a type or tuple of types
if type(get_background) is 'NoneType':
#do stuff.
This just gets skipped over and my code blows up.
How do I check if get_background
is of NoneType
.
print(type(get_background))
<class 'Nonetype'>