public static string Operation_TypeOf(JsObject scope, string identifier) { object value = scope.GetPropertyRaw(scope.Global.ResolveIdentifier(identifier)); if (value == null) return JsNames.TypeUndefined; var accessor = value as PropertyAccessor; if (accessor != null) return Operation_TypeOf(accessor.GetValue(scope)); return Operation_TypeOf(value); }