1. If raw_pointer is already nullptr, there is nothing to delete. And there is no problem deleting a nullptr, so go ahead and just delete raw_pointer.
2. Self assignment. If in your code you do my_unique_ptr a(somePtrValue); a = std::move(a);, you will end up deleting your data but maintaining a pointer to this memory after the function is complete. This is a dangling pointer and leads to memory corruption.
Instead, at the very beginning of the function, check to see if both raw_pointer and target.raw_pointer are the same. If they are, you are self-assigning, and you can just return.