Changes readInt to return NaN on invalid values.