Heartburn while pregnant

Is it okay to take Tums while pregnant if I have bad heartburn?