There is a `isEmpty()` method on `ITextSelection` (from `ISelection`).