If you are only checking for NOT undefined, why don't you just use
```
if (req.query.page) {
```