added a function that checks if an inventory item is available