It's a bug in the plugin. You are not allowed to call ret.set_string() with a non-string type - it will break the runtime. So set_string enforces this and shows that error if you pass it something which isn't a string. It's the plugin's responsibility to check the variable type and ensure it's always a string. (Just returning an empty string if it's not a string type is an easy way to handle it, for example)
Tip: if you get an error like that, in Chrome's dev tools open preview_prelude.js and put a breakpoint in assert2 after the "if (!cnd)" line (meaning the assertion has failed). Then just before getting that error dialog Chrome will break in the debugger and you'll have the full call stack to browse and see what went wrong and what the variables are at the time of the call, etc.
Closing as it's a third party plugin bug.