Is there a generic way to explicitly cast a variable to a specific type? For example:
var b = true;
var str = "";
var n = 5;
cast(someVariable, typeof b);   //someVariable become a boolean
cast(someVariable, typeof str); //someVariable become a string
cast(someVariable, typeof n);   //someVariable become an integer
where a cast is supposed to be that magic casting method.
That's obvious that I can just enumerate in a switch all possible types. But is there a [beautiful] native way to do that? 

Boolean( someVariable ), Number( someVariable );?