Parses a string representation of a Decentralized Identifier (DID) into a DID object.
The DID object.
The string representation of the DID.
if the string is not a valid DID.