I thought the mainstream view was that fiat money was–in most mainstream theories and possibly in practice–a bubble.

Jean Tirole (Econometrica, 1985) defines a bubble (it’s a conventional definition among economists), and notes that Samuelson’s excellent model of money fits that definition:

Since Samuelson developed his consumption loan model it has been well  known that there exist economies in which money has a positive value in spite of the fact that it is intrinsically useless (i.e., its market fundamental is zero). In other words there can exist a bubble on money where a bubble is defined as the difference between the market price and the market fundamental.
Dow and Gorton (Econ Letters, 1993) go further, labeling money-as-bubble as often part of the “standard model”: 
The standard model has the property that money is valuable in equilibrium, even though it has no intrinsic value. It is often viewed as a bubble for this reason.

 

Ross Starr (J Math Econ, 2003) reports the “prevailing” view:
The currently prevailing (alternative) treatment of the value of fiat money in the literature, Wallace (1980), Kiyotaki and Wright (1989), Samuelson (1958), etc. is to treat money as a bubble in an infinite horizon model….There are typically multiple equilibria then, including a nonmonetary equilibrium where…fiat money has zero value.
The last sentence is my favorite part of the money-as-bubble story: There’s always the possibility that, as one of my professors put it, we all wake up one morning and realize, “Hey, this is just paper money!” Then we rip it all up and toss it out the window.
There are ways of ruling out these money-as-bubble equilibria, and Paul Krugman notes one: You need to pay your taxes in money.  That pins down a fundamental value to money.  
But count me among those who think this isn’t empirically that important.  Glad to see tests of this, but I’m guessing if a small, fairly stable nation one day decreed “Taxes must be paid in a foreign currency,” fiat money in that nation would still hold about the same value the next day.  
Another way to make fiat money work comes from a great paper by Nicolini: The government issues paper money, but in his world we “all know” that if people started getting nervous about the value of the pieces of paper, the government would tax our real assets and hand us those real assets in exchange for the paper money.  But if we “all know” the government will do that, then the government never needs to do it.  
My intuition tells me this is closer to the truth than the channel Krugman notes: I meet people who already believe the government will turn money into gold on demand, and they get a little nervous when I disabuse them of their touching faith.  Some people already “know” about Nicolini’s model, and here the ironic quotation marks might have some real-world implications.  
But I suspect neither of those political stories is as important as the sociological story told by Samuelson.  Fiat money is, to use Paul Samuelson’s expression, a “social contrivance ” more than a fiscal one.  We take money from other people because we know other people will take it from us.  And the best part of Samuelson’s story is that this “social contrivance” of fiat money can make everyone better off.  
In the right setting, we should all welcome Paul Samuelson’s bubbles.  
Coda: Samuelson’s original paper is just a pleasure to read.  His prose is excellent, gripping, with twists and turns worthy of a Sherlock Holmes story.  That man knew how to keep his audience engaged.