Use isNan to check for NaN on toTimeString method