properly handle empty object in loadInventory methods