If you provide a custom deleter, it is up to your deleter to handle null pointers. This is a departure from std::unique_ptr which will not invoke the deleter if the owned pointer is null: https://en.cppreference.com/w/cpp/memory/unique_ptr/~unique_ptr