private static @Nullable TextRange getElementRange(@Nullable SmartPsiElementPointer<?> pointer) {
      return pointer != null ?
             ObjectUtils.doIfNotNull(pointer.getElement(), element -> element.getTextRange()) : null;
    }
private static @Nullable TextRange getElementRange(@Nullable SmartPsiElementPointer<?> pointer)