We should remove connectionURLTheSame from the global scope because it's only used by ShardingTest and because it's not robust to invalid parameters.
Original description:
connectionURLTheSame is a shell-only function that will recurse too much on invalid parameters:
connectionURLTheSame(db.test, {});
We can add type checking to prevent this behavior, which sometimes results in test failures when fuzzing.