excluding error cases
updating error check isNan