Change isNan method