The code invoked 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.
To correct this error
-
Only invoke the Boolean.prototype.toString or Boolean.prototype.valueOf methods on objects of type Boolean.
See Also
Reference
Boolean ObjecttoString Method
valueOf Method
prototype Property