Added check for class exists (no traits, interfaces)