Add method to check whether a country code exists.
Simplify filtering logic.