When `valuator_group` was `nil`, `[valuator_group&.investment_ids]` is evaluated to `nil`, and so we were adding an extra element to the array. We could add a `compact` call to the resulting array, but I find it easier to convert `nil` to an array using `to_a`.