How can I check if a variable\'s type is of type Boolean?
I mean, there are some alternatives such as:
if(jQuery.type(new Boolean()) === jQuery.type(
If you want your function can validate boolean objects too, the most efficient solution must be:
function isBoolean(val) { return val === false || val === true || val instanceof Boolean; }