Why `expertMode` isn't a boolean?
IMHO, something like this is more suitable:

```js
expertMode = !!expertMode;
```