As long as the Soviet Union existed, the target of deterrence was perfectly obvious. The idea is beyond absurd. Of course, every nuclear arsenal is both a deterrent and a goad to proliferation. Today the adverse effect on proliferation is the chief effect. The truth of this becomes especially evident when we consider terrorism.
Proliferation makes diversion into the hands of terrorists likely.
In their case, the proliferant effect of nuclear arsenals is all, their deterrent effect zero. They do it for urgent local reasons. Yet the barest glance at the Indian political scene is enough to demonstrate that the example of the current nuclear powers has been potent on the sub-continent. By all accounts, the Indian tests were conducted as much for domestic political reasons as for external strategic ones. The lesson of history in the nuclear age is that nuclear weapons beget nuclear weapons.