```js
if (typeof params.cookie === 'string') {
```

should be used as ``split`` is called on this value later. One can call phantomas with ``--cookie`` command line option as a flag...