1034429: Fix stacktrace in logs on unregister.

Don't check if we support content resources if we don't have a valid
identity.