title: Flask query result is none but if statements not working properly
body: <p>I don't have any row in my table and I expect that model query return None. So far everything is normal. But in following code, else statement works. I would like to know why else statement is working even though it is None.</p>
  <pre><code>known_dataset = Dataset.query.filter_by(user_id=current_user, status='1').first()
  print('====known_dataset', known_dataset) # &lt;Dataset None&gt;
  if known_dataset is None:
       print('====if') # not working
       known_dataset = Dataset()
       ...
  else:
       print('====else') # working
       ...
  </code></pre>