How do I get any variable’s DataType?

Problem:


var num:Number = 1;
trace(num == Number); // false

How do I get the datatype of a variable? In this case it is pretty obvious, but I am trying to make a substitute for function overloading in a class.

Thanks