You need to check that `w_cls` is really a class here.