When all you have is a hammer, every problem starts to look like a nail. This is just another in a very long line of very dumb ideas of how to use nukes. As with the problem of how to deal with potential earth-impacting asteroids, it's the long and slow ideas that actually might end up being useful. Fling a nuke at it and hope for the best is just bat-shit insanity.
Besides, the rate of catastrophic failures for rocket launches is about 6% (using launch data from https://en.wikipedia.org/wiki/Comparison_of_orbital_launchers_families ) and if terraforming like this was even vaguely feasible, it would almost certainly require a large number of rockets being launched, over a wide span of time, each carrying nuclear payloads, and that's not really something you want to see a catastrophic failure on.