public static boolean isErrorElement(@NotNull PsiElement element) {
    if (element instanceof PsiErrorElement) {
      String description = ((PsiErrorElement)element).getErrorDescription();
      for (String ignorableMessage : IGNORABLE_ERROR_MESSAGES) {
        if (ignorableMessage.equals(description)) return false;
      }
      return true;
    }
    return false;
  }
public static boolean isErrorElement(@NotNull PsiElement element)