Did you consider using the `Array()` method here? It casts nils to an empty array, and I believe it flattens array when they're passed in as well.