Added a check for class existence to all adapter classes