Move isNaN() elsewhere