The way I see it, there should be only the following ways to ask for a namespace and either it should be just 1 or all, but not some combination of the three:
Either I give you the namespace (db.coll) and I don't care what's behind, which should be 99% of the cases
OR I give you the DB+UUID and I don't care what's the name
OR I give you all of the above and I want them all to match
There are a few places where we track an optional nss, dbName, and uuid, which look deceptively similar to a NamespaceStringOrUUID. We should consider introducing a new type to express the case that NamespaceStringOrUUID cannot currently handle: NamespaceString and UUID. Another choice might be to support a third state in the NamespaceStringOrUUID union (and perhaps rename that type to something like CollectionOrViewLocator).