Is it possible to use `defined`, `const_defined?` or some other way to detect this without using exceptions for control flow?