In CatalogCache::checkEpochOrThrow() we check if there pointer to routingInfo associated with a collection is non-null.
In _scheduleCollectionRefresh() (which may run at the same time as a call to checkEpochOrThrow()), we std::move() from collEntry->routingInfo. See here. (Keep in mind that std::move()ing from a shared pointer will "transfer" the reference count to the left hand side, and set the right hand side to nullptr).
The routingInfo is reset once the refresh has completed here. This means that in the period during which the refresh is happening (after we've scheduled the refresh, dropped the mutex, and are waiting for the background thread here), the collection's routingInfo will be nullptr, so it will appear to be unsharded.