private static TextRange checkRange(final PsiElement element) {
    final TextRange endRange = element.getTextRange();
    LOG.assertTrue(endRange != null, element);
    return endRange;
  }
private static TextRange checkRange(final PsiElement element)