Deductions & credits

If you wrote the check in 2017, you can take it on your 2017 return.