refactor: fix Yoda conditions
Yoda conditions are named so because the literal value of the condition comes first while the variable comes second.
For instance,
```js
if ("red" === color) {
// ...
}
```
Yoda condition is fixed by switching the literal and variable.