Tweak TypeMap; more rigorous

Simply block until the cloud locks before getting a type id.