private static boolean isDeprecated(@Nullable final PsiDocCommentOwner element) {
    try {
      return element != null && element.isValid() && element.isDeprecated();
    }
    catch (IndexNotReadyException e) {
      return false;
    }
  }
private static boolean isDeprecated(@Nullable final PsiDocCommentOwner element)