> Because of testing for falsy values `!index` would be `true` for `0`, but the intention of the caller could be to actually get the connection at index `0`.

Then why not comparing `index` to `undefined` instead?