you can prevent exceptions here with this code:
```
def class_exists?(class_name)
  return false unless Module.const_defined? class_name
  return Module.const_get(class_name).is_a? Class
end
```