Using `is(A B)` syntax, you can compres such an if/else into just:
```D
static if (is(AliasThisTypeOf!T AT) && !is(AT[] == AT) || is(T AT))
    alias C = OriginalType!AT;
```

Note, you can also do this and get rid of `OriginalType`, since it's basically a complicated way to *keep* the qualifiers of an enum:

```D
static if (is(AliasThisTypeOf!T AT) && !is(AT[] == AT) || is(T AT))
    static if (is(AT U == enum) || is(AT U))
        X = U;

static if (is(Unqual!X == bool))
    alias BooleanTypeOf = X;
else
    static assert(0, T.stringof~" is not boolean type");
```

Or if you want to go overboard, it can be reduced to:
```D
static if ((is(AliasThisTypeOf!T AT) && !is(AT[] == AT) || is(T AT))) && //Is it an original type?
           ((is(AT U == enum) || is(AT U))) && //Is it an enum?
           is(U == bool)) //is it a bool?
    alias BooleanTypeOf = X;
else
    static assert(0, T.stringof~" is not boolean type");
```
Or, if you want to keep originalType, then:
```D
static if ((is(AliasThisTypeOf!T AT) && !is(AT[] == AT) || is(T AT))) && //Is it an original type?
           is(Unqual!(OriginalType!AT) == bool)) //is it a bool?
    alias BooleanTypeOf = X;
else
    static assert(0, T.stringof~" is not boolean type");
```
Actually, keeping original type might be simpler :)