With twins on the way, “Grey’s Anatomy” star Patrick Dempsey is making sure his marriage is on solid ground – by taking his wife to a shrink.

“We go in for checkups and go, ‘Hey, here’s what we need to work on,'” the actor divulged in an interview.

Patrick and Jill have been married since 1999. They have a 4-year-old daughter and Jill is pregnant with twin sons.

“We’ve had a very good relationship from the beginning,” revealed Patrick. “But you run into things you have to work through. And (marriage counseling) is easier than fi ghting.”

Dempsey, who plays Dr. Derek “McDreamy” Shepherd, says fatherhood has given him incentive to make sure his marriage stays in top shape.

“You look at your relationship and go, ‘How do I improve this? How do I keep growing and create a stable environment for my children?'”

Devoted wife and mom Jill is Dempsey’s second spouse. When he was 21, he married Rocky Parker, who was 47. Their stormy marriage ended in divorce in 1994.

The star has become a big booster of marriage counseling, according to a set source.

“He’s told me you can’t wait for something to go wrong – you have to take care of the problem before it becomes unfixable.”

But marriage counseling has a spotty track record with Hollywood couples.

Halle Berry, Jane Fonda, Whitney Houston and Kathy Griffin all went into therapy with their husbands – but all landed in divorce court.

Madonna, Courteney Cox and Mel Gibson underwent marriage counseling and are still with their spouses.