updated world regions function to check for null values