Avoid creation of extra hash with merge just to set a value
Simplify number parsing logic in numericality validation