Turning a single value into an array
<p>In my project I often find myself checking if a value is an array.  </p>

<p>If the value is not an array I create a single element array from it.  </p>

<p>If the value is <code>undefined</code> or <code>null</code>, I create an empty array.</p>

<p>The value itself is usually either an array of objects or a single object or <code>undefined</code></p>

<pre><code>const array = value ? (Array.isArray(value) ? value: [value]) : [];
</code></pre>

<p>Is there a more succinct way of doing this (perhaps with <code>lodash</code> or <code>underscore</code>), before I decide to factor this into a separate util function?</p>