> only convert it produces a valid number

Perhaps `only convert if the result is a valid number` would be better?