Check if float x is not a number (NaN). This function has been overriden from math.isnan to work element-wise on iterables