Add safety check when accessing NSLocaleCountryCode.

Some region formats (like Esperanto) lack a country code and return nil
instead, so they can’t be set as a value in a dictionary.
Merge pull request #129 from jurysch/master

Add safety check when accessing NSLocaleCountryCode.