North Korea's nuclear capabilities isn't what kept them from being attacked. It was Seoul being in artillery range and the refugee crisis on the chinese border that would result.
IMO, North Korea having nuclear weapons and Seoul being in artillery range of NK are strategically very similar, therefore hard to separate. Both allow NK to cause great destruction and many deaths in a short time.