I would recommend checking that this isn't returning a null value.
Put it in a variable and do a null check on the variable. Your problem may come from the name of the item. It's recommended to use an array of item IDs (you can search the item id here: https://www.osrsbox.com/tools/item-search/)
Also, the API is extremely fast. Make sure you're checking that the store is open before running that code. You should only run that loop if getStore.isOpen() returns true.