Are laxatives ok to take while pregnant?

Erica
My doctor said it was fine but I been reading bad things about it