At this point, the only way to check types is by coding wisely. An `is`-operator could help by adding these two syntaxes: if (value is string) { ... } if (value is string str) { ... (do something with str) }