Python's NaN check only works for Floats, needed own solution