This is probably because the documentation says: Use IsNaN to determine whether a value is not a number. It is not possible to determine whether a value is not a number by comparing it to another value equal to NaN. BTW .equals seems to work too, but I am not too sure :) > Could someone explain to me why my //TODO's don't work..