Despite the alarming headlines generated by some spectacular problems in the municipal-bond market, these funds have an important role in many investors' portfolios. How to choose.

Bonds have been getting a lot of bad press. Last year, Investment-grade bonds posted their worst results since 1994. Municipal bonds fared even worse, suffering from the one-two punch of rising interest rates and credit-quality concerns, as well as the spectacularly bad problems plaguing Detroit and Puerto Rico. The Barclays Muni Bond Index fell 2.6%, and investors yanked $58 billion out of muni funds.