What I want is something like this: ---- string className(in Object obj) { return obj is null ? "null" : typeid(obj).name; } ---- ...except I want it to work in CTFE. What is the way to do this in D?