Handle `base` being a string correctly