JSVAL IS BOOLEAN
From MDC
Determines if a given jsval is a JavaScript boolean.
[edit] Syntax
JSVAL_IS_BOOLEAN(v)
[edit] Description
JSVAL_IS_BOOLEAN(v) is true if the given JavaScript value, v, is a boolean value (that is, it is either JSVAL_TRUE or JSVAL_FALSE).
To convert between JavaScript boolean values (jsval) and C boolean values (JSBool), use JSVAL_TO_BOOLEAN and BOOLEAN_TO_JSVAL.