Check actor type instead of instanceof

This is needed because if relation is defined via mediator class, role check fails