This is questionable (arguably wrong) semantics.

If `t->u == PETSC_NULL`, then the `CHKERRQ` inspects the return code of the previously executed PETSc call which could be quite far removed from the intended location.  I'd probably write this with explicit braces, e.g., as
```C++
if (t->u != PETSC_NULL) {
    code = VecDestroy(&t->u);
    CHKERRQ(code);
}
```
At least if every PETSc call should be followed by a `CHKERRQ`.