Several access functions require a selected instance in the property handle passed to the function. Check the selection before calling the function in order to avoid exceptions.