simpler to move this to the top of the function

```javascript
if (typeof server.ext !== 'function') return new Error('blah blah');
```