Heartburn med help

Hi guys, 
Back in June I had a chemical pregnancy and my husband and I are wanting to try again soon I just feel like I have a concern. I've been on 40 mg of nexium for a awhile now and now my insurance won't cover it so they switch me to a gernaric prilosect and cut me down to 20 mg. I've eventually wanted to ween myself off of it and I'm going to try to only take the 20 mg a day. I've read many things about heartburn medication and am concerned about taking them if I become pregnant. I've suffered from heartburn since high school. Does anyone have the same situation as me and is on heartburn medication with a healthy pregnancy? Any advice would be great. Thanks