Function restorePrecisionValue

Converts a plain number or legacy value to a PrecisionValue object