Why is this a classmethod, instead of just a function? For that matter, why does this even need to exist? We should have consistent types throughout the application -- this function indicates that our types are inconsistent. We should fix the root problem, not apply a bandaid like this.