title: In python, sorting on date field, field may sometimes be null
body: <p>I am having a hard time coming up with a slick way to handle this sort.  I have data coming back from a database read.  I want to sort on the accoutingdate.  However, accoutingdate may sometimes be null.  I am currently doing the following:</p>
  
  <pre><code>results = sorted(results, key=operator.itemgetter('accountingdate'), reverse=True)
  </code></pre>
  
  <p>But, this bombs with "TypeError: can't compare datetime.date to NoneType" due to some accoutingdates being null.</p>
  
  <p>What is the "most correct" or "most Pythonic" way to handle this?</p>