Remove unnecessary null pointer checks

Addresses #135.

Removes the pattern:
```
if (ptr) {
  delete ptr;
}
```