@paulmillr like this?
```
if (this == null) throw new TypeError("Cannot call method 'startsWith' of null or undefined");
```