You can replace this block with:
```D
enum isSameTypeAsHead(U) = is(U == types[0]);
```