Throws EnvelopeError.invalidType if the envelope does not carry the supplied KnownValue as its type.
EnvelopeError with code InvalidType.
InvalidType
Throws EnvelopeError.invalidType if the envelope does not carry the supplied KnownValue as its type.