Symptoms
Unable to access Manage Site Realms form with error:
"Specified cast is not valid"
Diagnoses
Looking through the following tables:
there were realms which were not mapped to any issuer.
Resolution
After running a SQL script to insert new entries in the iK2].nIdentity].[ClaimRealmIssuer] to include the mapping, this was fixed.