This must be a class now.
Don't think the function should be defensive and check every type passed in, though.
Will change the param to cls