The Ayatollah wasn't killed, but Gaddafi and Hussein were, while the Kim family is still fine.
So from a regime leader point of view, it's better to have a nuclear weapon than not have it. For a member of the population it's probably a good idea to stay away from it.