Fix NONE comparison for Py3k.