Updated localizeNumber

Allowing errors to propagate for invalid values.
Corrected Indentation