check = None
for line in list:
if line == None: #Пробовал еще просто "if line:"
check = res
elif list.index(line) == len(list) and check == None:
return None
if len([i for i in list if i is not None]) > 0:
...
if any(list):
...
if all(list):
...