Well, even if you don't use `get_modulestore_type`, you should at least use `isinstance`, rather than just string comparison on the class name.

I'm a little concerned about what this code will do in the presence of a `MixedModulestore` though.