Fix issue with empty object vs empty array