checking if column value is not None

for some reason sometimes get None as value, looks like when value in database is NULL