Optional<PsiElement> startElement = Finders.findFirstElementAtLine(psiFile, issue.getLine());
if (!startElement.isPresent()) {
// There is no AST element on this line. Maybe a tabulation issue on a blank line?
annotation = createAnnotation(holder, issue.formattedMessage(), Finders.getLineRange(psiFile, issue.getLine()), severity);
} else if (startElement.get().isValid()) {
TextRange lineRange = Finders.getLineRange(startElement.get());
annotation = createAnnotation(holder, issue.formattedMessage(), lineRange, severity);
} else {
annotation = null;
}
}