JSContext-method-validate function

Assess validity of JS code without evaluating