I agree that the usage of nuclear weapons should be avoided at all cost. The only purpose for nuclear weapons I see is that it could be used to deflect a small asteroid that could smash into our planet.
Could an AI be programmed to become an extremely good hacker, login to a Nuclear weapons launch facility and command firing to start the extinction of Life on Earth?