Result of __traits(parent) may not have a type

Found by fixing https://d.puremagic.com/issues/show_bug.cgi?id=9081

See https://github.com/D-Programming-Language/dmd/pull/2866