JScript  

String expected

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

To correct this error

Only invoke the String.prototype.toString or String.prototype.valueOf methods on objects of type String.

See Also

String Object | toString Method