You don't actually have to test for non-null. `delete` is a no-op for null pointers.