Checking length here will still throw a runtime error of (see jsbin example [here](http://jsbin.com/IHOtUWa/1/edit?html,js,console)):
```TypeError: Cannot read property 'length' of null```

Therefore, just checking for its existence would suffice:

```if (prevSibling) {```