IF the USP for OH Blocky is simplicity, IMHO OH Blockly must be strongly typable (well, kind of …). One cannot expect from a beginner that she/he takes into account class hierarchy, polymorphism, overloading of operators, implicit typecasting etc. on the underlying layer.
Telling an OH Blockly user that there is a high probability that the result of get state of item
is of type string
doesn’t help at all - and introspection isn’t a concept a beginner is familiar with (let alone that there aren’t any corresponding blocks yet).
I would recommend providing blocks for explicit typecasting to ‘basic’ types: toString, toNumber,
…
If unsure about the type of results of blocks, use explicit typecasting. If you know what you are doing, don’t use it.
Latest example: