Add checks to make sure every needed class is a subclass of the correct subclass