Swap the conditional order here to avoid one level of nesting:

```
if (!existing[name]) {
   addPreset(...)
} else if (existing[name].count !== -1 && count > existing[name].count) {
   ...
}
```