It has sometimes been asserted that money is something of an embarrassment for the economic profession; a lot of the older models especially tend to assume perfect markets (or, more typically, markets that are only imperfect in one or two ways of particular interest at a time), and perfect markets have no need for a unit of account or a medium of exchange. One of the first models that attempted to explain money, then, was Samuelson's 1958 paper in which interest rates without money were negative, such that money provided a store of value that gave a better return than other stores of value.
I've never really appreciated this, because the idea seems wrong; there are a lot of other assets that typically (before the last 7 years) have higher returns than money that seem better in every way except for liquidity. Surely the reason money has social value is that it provides a medium of exchange; in particular, money can be exchanged more readily than the other assets for other needed goods and services at a moment's notice.
On some level, though, this is a false distinction, or at least one that in practice is blurred. A treasury bill maturing in three months is a great store of value for storing value from now until three months from now; it's not quite as good for storing value from now until one month from now. Insofar as prices are stable, a dollar is a good way of storing value between now and whenever you want. Insofar as you can sell a treasury bill for pretty much what you paid for it a month from now, it does a pretty good job, though; the market liquidity of a treasury bill makes it almost as good as cash. A three month (non-tradable) CD is much less suitable.
If, conditional on the event that you need to make a purchase a month from now, the price at which you can sell an asset is correlated with the price of the good, that asset might actually be a better store of indeterminate-period value than dollars are. If the correlation is weak or negative, assuming you're risk averse, it's less suitable. If it's likely that, conditional on a sudden desire for cash, the price at which you can sell is likely to be low, it does a poor job as a tool for precautionary saving — regardless of whether the price at which it could be purchased has fallen as well. As has been previously noted, you don't so much care, when buying a financial asset, whether the bid-offer spread will be tight when you want to sell, just what the bid per se is likely to be.
A point I've been making in some forms in various venues for a while is that the value of a store of value is affected by who the other owners and potential owners of the asset (or even its close substitutes) are; if a particular asset looks like a good store of value to a certain subset of the population, it may become a poor store of value for that subset of the population if that subset is characterized by a similar set of exposures to liquidity shocks. If all people who have a last name starting with J face a liquidity risk that would otherwise be well hedged by the possession of a store of beanie babies that could be sold, that could well lead a large number of beanie babies to be owned by people with a last name starting with J. If the risk materializes, we're all trying to sell our beanie babies at the same time. If people acquire assets without considering who else owns what, this sort of "fire sale" risk develops naturally for any liquidity event that is likely to affect a substantial portion of the economy while leaving another substantial portion of the economy unscathed; some set of assets that are otherwise well-suited to protecting against the risk become concentrated where they are likely to result in a fire sale. If the rest of the population is able and inclined to step in and buy, this problem may not be insuperable, but for most reasonable market structure models it's likely to create at least some hit, and if the asset is inherently less attractive to people whose names don't start with J than people who do, their willingness to step in may be minimal.
This, though, is as true of dollars as it is of beanie babies; possibly more so. Dollars are only valuable insofar as someone else is willing to trade something for them when you need it. If the residents of a particular country are all trying to spend down savings at the same time, they may find that they drive down the value of their currency to an extent commensurate with their tendency to save in assets denominated in that currency. It is commonly suggested that Americans don't put enough of their retirement savings abroad; especially for Americans in large age cohorts, this is effectively one of the reasons to diversify globally rather than only investing domestically.