Verify the inner exception is the correct type.