If I want to check that a variable is numeric (not an array, char, text string, etc), is this an effective approach? It would also convert a string to a numeric if possible. And then I'd only need a single "instanceof" check rather than four for numbers, floats, longs and doubles? This should also handle booleans as well, converting the true/false to a 1 or 0?
=================
obj = obj.toFloat();
If (obj instanceof Lang.Float) { do stuff } // numeric
else { do other stuff } // not numeric
==================