The input parameter 'value' is always passed as a string. The return value is automatically coerced to string via ToString() method (if it fails then the error is returned as string value), with a few exceptions:
Errors can be returned by throwing values/objects (normally either strings or Error objects).
Each script has a 10 second execution timeout (depending on the script it might take longer for the timeout to trigger); exceeding it will return error. Also a 10 megabyte heap limit is enforced.
Consecutive runtime failures (3 in a row) will cause the engine to be reinitialized to mitigate the possibility of one script breaking the execution environment for the next scripts (this action is logged with DebugLevel 4 and higher).