Possible typo. The second part of the expression will never be false.

```
type || type !== 'any' // this is false only when type === `any`
// which gives us
'any' || 'any' !== 'any'
// which means the second par is never evaluated, as `any` is truthy
```