private static boolean isDataValid(@NotNull Object data, @NotNull String dataId, @NotNull Object source) {
    if (isPsiElementProvided(data) &&
        EDT.isCurrentThreadEdt() &&
        SlowOperations.isInSection(SlowOperations.FORCE_ASSERT)) {
      reportPsiElementOnEdt(dataId, source);
    }
    //noinspection unchecked
    Validator<Object>[] validators = (Validator<Object>[])getValidators(dataId);
    if (validators == null) return true;
    try {
      for (Validator<Object> validator : validators) {
        if (!validator.checkValid(data, dataId, source)) return false;
      }
    }
    catch (ClassCastException ex) {
      reportObjectOfIncorrectType(dataId, source, ex);
      return false;
    }
    return true;
  }
private static boolean isDataValid(@NotNull Object data, @NotNull String dataId, @NotNull Object source)