I don't remember if the rest of the code here uses truthyness, but in general I think we should try to stay away from it as much as possible

```
err != null
```

Is what should be here instead.