Prevent negative grid line values. Defaults to 1 on invalid value.