Add type check and unit tests to region normalizeUIKeys