How about the following instead?

```d
if (exists(objDir))
{
    enforce(dryRun || isDir(objDir));
}
else
{
    mkdirRecurse(objDir);
}
```