public static string TypeofName(Scriptable scope, string id) { Context cx = Context.GetContext(); Scriptable val = Bind(cx, scope, id); if (val == null) { return "undefined"; } return Typeof(GetObjectProp(val, id, cx)); }