Construct does type casting. If you put a string, which is a number into a number-variable, it will be a number. If it's a string and you try to put it into a number-variable you get a NaN (not a Number). You can test your variable if it's a NaN. So you only have to put the return value in a number-variable an look if it's a NaN. If it's a NaN it is a string otherwise a number.
Something like only her comes the string from a Textbox:
Global number myNumber = 0
+ Button: On clicked
-> System: Set myNumber to TextBox.Text
+ System: myNumber is NaN
-> Text: Set text to "String"
+ System: Else
-> Text: Set text to "Number"