JScript  

Boolean expected

You attempted to invoke the Boolean.prototype.toString or Boolean.prototype.valueOf method on an object of a type other than Boolean. The object of this type of invocation must be of type Boolean. For example:

var o = new Object;
o.f = Boolean.prototype.toString;
o.f();

To correct this error

See Also

Boolean Object | JScript Data Types | Controlling Program Flow | Copying, Passing, and Comparing Data