Additional checks for InventoryLogic to prevent crashes with invalid slots.