title: Filter postgres JSON column by null value in SQLAlchemy
body: <p>So I've got a model like such: </p>
  
  <pre><code>class myModel(Base):
  
      id = Column(Integer, primary_key=True)
      border = Column(JSONB)
  </code></pre>
  
  <p>How can I query for rows that don't have a border? I've tried:</p>
  
  <pre><code>filter(myModel.border != None) #nope
  filter(myModel.border != 'null') #nope
  from sqlalchemy import null
  filter(myModel.border != null()) #nope
  </code></pre>
  
  <p>The value is apparently stored in <code>postgres</code> as a <a href="https://bitbucket.org/zzzeek/sqlalchemy/issue/3159/cant-insert-null-into-a-json-column-if" rel="noreferrer">"JSON encoded null value"</a>. Its definitely getting serialized back to a python <code>None</code> when instantiated, but I have no idea how to query against it. It looks like you can set <code>none_as_null</code> on the column, i.e.: </p>
  
  <pre><code>Column(JSONB(none_as_null=True))
  </code></pre>
  
  <p>Which replaces the JSON encoded <code>null</code> with a SQL null, but that seems strange to have to do on all columns. What am I missing here? </p>
  
  <p>edit: should mention this is v0.9.8 of sqlalchemy</p>