Good catch on this little bug.  I'd prefer if we simplified the logic, though:

```javascript
function collationIndex(x) {
  if (x === null) {
    return 1;
  }

  var type = ['boolean', 'number', 'string', 'object'].indexOf(typeof x);
  if (type !== -1) {
    return Array.isArray(x) ? 4.5 : (type + 2);
  }
}
```