The answer without a doubt, is YES!
If anyone believes Iran is a dangerous place, it is because of the media.
For many years, American journalists have portrayed Iran in a highly distorted way, emphasizing only nuclear weapons, religious extremism, human rights abuses, and essentially painting it as a tyrannical state.
It used to be the same story in Europe, but I believe they have softened their tone, and today, while they are still talking about all the crazy things going on there, they are constantly publishing reports and chronicles about its great tourist attractions and people, which is one of the reasons why many travelers have begun to consider Iran a safe destination to travel to.
Travelers are rapidly realizing that Iran is the ultimate location, from the most hospitable people to the oldest history, gorgeous architecture, the most desolate deserts, green mountains, islands, and many other things.
However, because it has just lately opened to tourists, traveling in Iran poses a number of obstacles and idiosyncrasies, ranging from strict Islamic restrictions to credit card complications.
Yes, Iran is a safe place to visit, but there are significant internal problems that we must overlook.
Even if I adore Iran, we cannot deny that it is a brutal dictatorship that breaches human rights. Iran is a dictatorial state governed by Islamic law. But, having a lousy government does not make its citizens bad, and you shouldn't worry about it as long as you abide by a few basic safety guidelines.
One of the main reasons Iran is seen as dangerous is that international arrests make headlines. That being said, the majority of foreign arrests are journalists or tourists who do suspicious or dangerous things, Examples include bloggers detained for flying a drone over a military installation or Americans caught crossing the Iranian border illegally from Iraqi Kurdistan. Be aware and you will be fine.
I should note that the state has become kind of paranoid after all it has been through in the last 45 years (after the revolution), so the best would be to avoid taking photos of highly confidential buildings and installations and also not to participate in any kind of protest in the country!
Don't be worried about the rest! The state won't detain you for not having a proper dress!