Catch NPE edge case in InventoryHelper.