UX feedback for restoring IAP

Hi

I have a couple IAPs in my app, with buttons to restore them. If a user who hasn’t purchased an IAP yet taps on the ‘restore’ button, is there a way for me to know that they haven’t bought the item yet, so that I can give them an alert? Would transaction.isError but true? In that case presumably transaction.originalReceipt would be nil and I could use that as a test.

Thanks.