Check type validity after call to TypeUtils::realType.
It internally also does not assume that, given a valid type, it will return a valid type. This hints at issues we have with parsing some code and creating reference types or type aliases pointing at invalid other types. At least now we hopefully don't crash anymore. BUG: 318972
Showing with 29 additions and 14 deletions