People have argued the danger of Iran with a nuclear arsenal by saying that it will be used against Israel and then the United States as Israel's ally might be a second target. The counter argument to that has been that by attacking Israel, Iran runs the risk of hurting Palestinians. I find both of these arguments fallacious and feel that there is little to worry about in terms of Iran's nuclear arsenal.
Iran must realize that the United States has the most powerful military in the world. By engaging in a war with the United States they would be making an incredible error. The United States has the power to hurt Iran, and if this war were to occur, in the peace treaty there would surely be a clause about certain natural resources that the United States might want.
Furthermore, as I previously said, the United States if anything would be a secondary target. This means that if Iran used nuclear weapons, the United States would have time to react and issue a warning to Iran.
I think it's a similar situation with North Korea. In that case we would be a primary target, but North Korea realizes that the United States possesses incredible strength which North Korea does not. Essentially, because of the power that the United States has, for now, we don't need to worry much about the potential of warfare with nations that have nuclear weapons.