Miralax?

Has anyone taken Miralax for constipation? My doctor just told me it was ok to take, but I thought I saw somewhere online that it should be avoided? I'm 22 weeks.