when would you say is the best time to get the whooping cough vaccine?

I am 27 weeks and my midwife said I can have it any time from now... what do you recommend