Investing in real estate can also be a hedge against inflation.