If you want a yes/no result, you will need t build an MII transaction that you can call with the required inputs and outputs for your needs. Withiin the transaction, perform an assignment to a local variable and catch any exception and handle as appropriate.
Regards, Steve