No, those are both rational actions in this case. Iran getting nukes is less dangerous than only Israels current nukes. If both Iran and Israel had nukes, the region might have a chance at peace.
If Iran's regime had nukes, I guarantee you'll see UAE, Saudi Arabia, Qatar and several others go all in on their own nuclear programs immediately. They'd be fools not to.
Israel's nukes are troubling, but the weird "nuclear ambiguity" doctrine has already stood for so long and managed to avoid nuclear flare-ups so far. I'd still like them to not have nukes, but they won't be launching any nuclear first strikes for sure - since we've seen them not do that even while fighting many major wars and suffering losses without taking that step...
The region will have chance at peace once the regime of Iran is removed.