Actually you wrong. Dolar has value, because even if no one will want dollar, government will buy it for dollar. It backed on government promise.
Also, just for a moment, the statement: "Dollar has value, because even if no one will want dollar, government will buy it for dollar." - that's a fair bit of nonsense, outside of the dollar having an exchange value the dollar has no value - fiat currency (and even precious metals TBH) only have value to to the continued demand for them and if that demand falters or if people stop valuing a dollar at as many whoppers as it used to be valued - then bad things start to happen really fast and the government is pretty powerless to stop it once it starts.