Farms when pregnant

I’m sure my midwife said to avoid farm animals when pregnant and I’ve been walking my dog around a farm/through the woods etc. I’m also going to soho farmhouse at the weekend. I won’t be touching animals but wasn’t sure how high risk it is? Am I ok to do all these things?