check validity of RangeHighlighter