But shouldn't you be inspecting the return of the principal to determine the valid types here? That's the bug in this case, you're only cosidering `Principal` which has a `getName` method..