Added a check to see if the time function is NaN