added some error checking to projectModel.add_class