nullpointer fix for countrycode