Allow unit format names to be case-insensitive (normalizing to lowercase) and include a type check in case the format is not a valid string.