Correct me if I'm wrong, but I don't believe the `if` is necessary here. Delete on an key which doesn't exist returns `nil`, I think.