Fix bug 11182 - dmd crashes on compiling regex

The Expression element in this CTFE exception raised by parsing wrong regex is of type TypeExp which don't override toString() which return NULL by default, the same goes to many other expression types, test its validity is mandatory here.

This issue come from 8779d47