Formats a given price to a specified number of decimal places.
The price to format. Can be a number, string, null, or undefined.
Optional
The number of decimal places to format the price to. Defaults to 2.
The formatted price as a string, or null if the input is invalid.
Formats a given price to a specified number of decimal places.