check for NaN in calculateTransformedTime

Otherwise, the cubic interpolator (possibly others?) will infinite loop because it never satisfies this condition-

        if (Math.abs(x - xEst) < 0.001) {

where `x` is `NaN`. `NaN - number == NaN`, `NaN < 0.001 == false`.