private static boolean isErroneous(PsiElement element) {
    return element instanceof PsiErrorElement ||
           element instanceof OuterLanguageElement ||
           element instanceof PsiLiteralExpression &&
           PsiLiteralUtil.isUnsafeLiteral((PsiLiteralExpression)element);
  }
private static boolean isErroneous(PsiElement element)