Add integral overload for isNaN for use in generic code

Raised by EMSI, in some of their templated code they pass T to isNaN, which sometimes was a uint.