NaN is a standardized dynamic languages datatype governed by IEEE 754, this is not something to complain about as its behavior is part of the official standard and for good reason, as outlined in the standard.
Also I suppose my memory could be pretty foggy as I don't think I've looked at the spec since about 2014.