return toObject(scope, val);
if (val instanceof Scriptable && val != Undefined.instance) { return (Scriptable)val; } return toObject(Context.getContext(), scope, val);
    public static Scriptable toObject(Scriptable scope, Object val,                                      Class staticClass)    {        return toObject(scope, val);    }