use const_defined? to check if class exists