Arguably the first part is redundant - I only included it thinking it would save doing the string comparison in the cases where the identity wasn't even eligible to be used as a default identity.