wxgui: there are more ways that NaN can creep in there, so check it explicitely