Check for None instead of boolean false
Implementing sophisticated equality rewriting