The end of the year is a prime time to consider financial strategies that could cut your tax bill—and to avoid mistakes that could increase it. This year, however, brings particular challenges. Many investors have seen the value of their portfolios increase substantially, potentially exposing them to higher capital gains and income taxes. And with Congress considering major tax measures, uncertainty has clouded the tax strategies of millions of Americans.

Although it wasn’t clear what if any changes to the Tax Code would be ­enacted, the possibilities as of early November included a higher standard deduction, fewer tax brackets and the elimination of some itemized deductions and personal exemptions. Based on everything going on, here are five year-end tax mistakes to avoid as 2017 draws to a close…

Mistake: Failing to prepay state and local income taxes. If you’ve been making estimated tax payments to cover 2017 state or local income taxes this year, your final payment is likely due in January. But prepaying any remaining state or local taxes before the year is over allows you to deduct the full value of your 2017 state and local tax payments from your 2017 federal income.

Prepayment of taxes due early in the following calendar year has long been a common year-end tax strategy. However, Congress has been debating whether to repeal deductions for state and local income and sales taxes and limit deductions on property taxes.

All these scenarios have one thing in common—they make it even smarter than usual for many taxpayers to prepay state and local taxes this year. That way, even if the federal deductions are eliminated or reduced, you still can claim them on your 2017 return. (Congress also was considering a lower limit on the size of mortgages that are eligible for the mortgage interest deduction on future home purchases.)

You also may have the option of increasing your deduction by prepaying some 2018 state and local taxes before the end of this year. Although you can’t prepay state income taxes, prepaying real estate taxes on your home may be possible, depending on what rules apply in your area.

Keep in mind, if you are subject to the Alternative Minimum Tax (AMT), prepaying your state and local taxes may not be beneficial, as you do not get a benefit for this deduction under this calculation. (A Republican proposal would repeal the AMT in the future.)

Mistake: Failing to offset investment gains. Because you might owe capital gains taxes on investments that you sold for a profit or on capital gains realized by mutual funds, it’s always a good idea to look for investment losses you can claim to offset those gains. Investment losses are especially valuable at the end of good investment years such as 2017, when you may have more investment winners than usual and could be facing higher-than-usual capital gains taxes.

If you have a diversified portfolio, some of your stocks may have gone down even if most have gone up. Utility stocks have risen dramatically this year, for example, while many retail stocks have plunged. Decide whether you have losing investments that no longer fit your strategy, and sell these before 2018 to offset any realized gains.

Mistake: Misunderstanding charitable giving rules. Depending on your age, you have different options for using charitable contributions to reduce your tax bill. Example: If you’re age 70½ or older, you can transfer up to $100,000 per year from an IRA to a charity—a transaction called a qualified charitable distribution (QCD). QCDs can count toward your required minimum distributions (RMDs), but you don’t have to report them as income, meaning that they can help reduce your income tax. For many years, QCDs were renewed by Congress on a year-to-year basis, often leaving taxpayers unsure about the rules for QCDs until the very end of the year. But at the end of 2015, Congress made QCDs permanently available, putting an end to the uncertainty.

If you’re not yet 70½, you still can reduce your taxable income this year by accelerating charitable giving and other deductible expenses. This strategy makes even more sense in 2017 because of potential changes to the standard deduction that were under consideration by Congress. If the standard deduction is significantly increased next year under new tax law, you may be less likely to itemize your deductions—making it especially appealing to maximize the value of itemized deductions this year.

Mistake: Taking income you could defer until next year. With reduced tax rates for some people on the table for 2018, it’s a good year to defer income if you can. If you expect to land in a lower tax bracket next year, consider ­delaying year-end income, such as a bonus, until January 2018.

For anyone turning 70½ this year, RMDs offer another opportunity for deferring income. They kick in when you turn 70½, but you don’t have to take your first RMD until April 1 of the following year. So if you turned 70½ in 2017, you don’t have to take your first RMD until April 1, 2018. The only catch is that you have to take your second RMD the same year (in this case, 2018). With the potential for lower tax rates next year, taking advantage of the rule that lets you defer this year’s RMD and instead take two next year may be a smart move.

Mistake: Failing to take advantage of natural disaster tax breaks. This year has been filled with natural disasters, from the wildfires of the West and ­Pacific Northwest to the hurricanes of the Southeast, Gulf coast and the Caribbean to a variety of floods and tornadoes. Personal casualty losses from natural disasters are deductible on your tax form as long as your property is located in an area that was federally designated a natural disaster zone because of the event that caused your loss. Any uninsured property destroyed by the storm can be claimed as a casualty loss.

Damaged property can also be claimed up to the amount of its adjusted value—that is, the price you paid, adjusted for any improvements—or the amount it decreased in value, whichever is lower. For real estate and vehicles, appraisers can provide the documentation required by the IRS. For smaller items, repair receipts are the most dependable form of documentation, but you also can have them appraised if necessary.

In addition, Congress has passed special tax breaks for victims of Hurricanes Harvey, Irma and Maria, allowing these taxpayers to write off all losses from hurricane damage without itemizing and eliminating the 10% penalty on early withdrawals from retirement accounts. Visit IRS.gov, and search “Harvey, Irma and Maria” for details on tax breaks in your area.

Finally, the IRS has lifted the limits on deducting charitable donations for hurricane relief. Taxpayers ordinarily can deduct charitable donations of up to 50% of their income, but in 2017, anyone making gifts that total more than 50% of income will be able to deduct the full value.