Fixes crash for when `@token` is `null`

Due to:
```javascript
typeof null // "object"
```

Leading to the subsequent operation -> `@{null}.username` which in turn throws:

```
TypeError: Cannot read property 'username' of null
```