CodeGen: Stop using DIDescriptor::is*() and auto-casting