This can be addressed by the following:

```js
var type = (current.type ? (current.type + ',') : '') +
  (current.carrier ? (current.carrier + ',') : '');
```