nonetype python check. Using `type ()`: if type (variable) is NoneType: