It's fine! Just stay away from their waste and cats waste too!
When I had my first baby we would let our dog go into her room smell whatever she wanted, and when we brought her home we would put some of her clean burp cloths or other things that smelled like the baby on the dog bed so she would always have our daughter's smell around her. She was perfectly fine with the baby
I never had trouble with dogs and babies.