The US, Russia, China, France, Israel, even India and Pakistan, are aware of and intimidated by the danger of nuclear war and are very wary of using their weapons. The new members of the nuclear club, North Korea and Iran, not so much. The leaders of both countries would have little hesitation in seeing vast numbers of their people annihilated in exchange for the annihilation of similar numbers of people in the US and/or Israel. Hatred has been institutionalized in both societies to a point where the logic of Mutual Assured Destruction is over-ridden by paranoia and the pathological acceptance of self-immolation as part of a final moment of national reckoning (much the same as Hitler desired in the final stages of WWII). 
An invasion of Iran is far less likely than a pre-emptive nuclear strike by Israel. The rationale will be simple: better that Iranians are slaughtered rather than Israelis.