Removed isNaN checks as they weren't needed.