selection: ensure that `this.range` is defined

In `getContaining()` and `placeMarkers()` functions.

Prevents uncaught errors as described in #204.
Just a 
```if (!this.range) return;```
here would minimize changes.