Do I claim a medical deduction on the 2016 tax return or the 2017 tax return when I wrote the check on 29 Dec 2016 but it was not cashed until 4 Jan 2017?

I was having dental work done and paid the dentist by personal check on 29 Dec 2016.  The dentist did not cash the check until 4 Jan 2017.  Trying to figure out what year I should claim this.