Add isNan(double) function for double type