class ActorUtil {

    public String getActorCrn(ActorBase actorBase) {
        String actorCrn;
        if (actorBase instanceof ActorCrn) {
            ActorCrn actor = (ActorCrn) actorBase;
            actorCrn = actor.getActorCrn();
        } else if (actorBase instanceof ActorService) {
            actorCrn = INTERNAL_ACTOR_CRN;
        } else {
            throw new IllegalArgumentException("Actor has an invalid class: " + actorBase.getClass().getName());
        }
        return actorCrn;
    }

}