function minIndex(a, b) {
  if (a === null) {
    return b;
  } else if (b === null) {
    return a;
  }

  return a < b ? a : b;
}
Return min(a, b), handling possible `null` values.

@param {number|null} a
@param {number|null} b
@return {number|null}