It'd be a great help if there was a way to determine a com result's cast type.
I purpose $com().ResultType
For Null values it would return "null"
For Boolean values it would return "boolean"
For Numeric values it would return "number"
For String values it would return "string"
For all other values it would return "unknown"
mIRC should not coerce the typing on account of the value. For example an empty string result should return "string" and not "null"