Handle empty objects and null values