moved filtering of categories into a method and added handling for blank categories
moved filtering of categories into a method and added handling for blank categories

unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet