Type Parameter Value from String

Dear All,
Is there a way to construct a parameter from a string?
I would like to create a Component Type Parameters for Legend Components by just typing it in string/code block node.
Any help, much appreciated!