codice:
function isA(type) {return this.constructor == type};
alert([
isA.call({}, Object), // true
isA.call("Hello", String), // true
isA.call(new String, String), // true
isA.call(function(){return false}, Function), // true
isA.call(new Function(), Function), // true
isA.call(/test/, Function), // false
isA.call(/test/, RegExp), // true
isA.call(new RegExp, Function), // false
isA.call(new RegExp, RegExp), // true
isA.call(RegExp, RegExp), // false
isA.call(RegExp, Function) // true
]);
però se ho usato typeof ed instanceof misa che c'è un motivo .. che non ricordo 
[edit]
facciamolecose semplici eper tutti va ...
codice:
function is(obj, type){return obj.constructor == type};
alert([
is({}, Object), // true
is("Hello", String), // true
is(new String, String), // true
is(function(){return false}, Function), // true
is(new Function(), Function), // true
is(/test/, Function), // false
is(/test/, RegExp), // true
is(new RegExp, Function), // false
is(new RegExp, RegExp), // true
is(RegExp, RegExp), // false
is(RegExp, Function) // true
]);