const head = arr => (arr && arr.length ? arr[0] : undefined);