code: private boolean hasOverriddenNativeProperty(String propertyName) {
      if (isNativeObjectType()) {
        return false;
      }
  
      JSType propertyType = getPropertyType(propertyName);
      ObjectType nativeType =
          isFunctionType()
              ? registry.getNativeObjectType(JSTypeNative.FUNCTION_PROTOTYPE)
              : registry.getNativeObjectType(JSTypeNative.OBJECT_PROTOTYPE);
      JSType nativePropertyType = nativeType.getPropertyType(propertyName);
      return propertyType != nativePropertyType;
    }
docs: Given the name of a native object property, checks whether the property is
  present on the object and different from the native one.