Would actually prefer

```javascript
if (items) {
    items.forEach(trimItem);
}
```

Since it makes it much easier to add additional clauses if necessary.

If you want to do it in a single line and make it more obvious, use the ternary:

`items ? items.forEach(trimItem) : 0;`

It's actually [faster in both Chrome and Firefox](http://jsperf.com/ternary-vs-single-if)