The each can be substituted by `var resourceTypes = _.compact(opts.resourceTypes.split(','));`.

`_.compact` removes all falsy values.