PY3: fix error comparison between None and float