Updated country name formatting to support both array and object types for the entity returned by get_entity. This ensures compatibility with different data structures and prevents errors when accessing the country name.