Schema.encodedSchema to return a valid UUID string. Although technically the random string is a valid instance of the type I (namely string), it would not actually decode if you ran it through S.decode(Schema.UUID).A data instead (first line of code) and then encode that.