The Javascript instanceof special operator evaluates whether or not the left operand explicitly matches the data type you specify as the right operand in the expression.
Javascript CODE EXAMPLE
var myVar = new String("abcdefghi");
if (myVar instanceof String){
document.write("Yes it is string type : "+myVar.constructor);
} else {
document.write("No that is not string type : "+myVar.constructor);
}