Deduplicate get_objstorage ImportError handling
And this is necessary to make the function type-check.