Is it safe to get liposuction before pregnancy?

OK before or after. It's your choice when as long as you're not currently pregnant.
No lipo if pregnant. It is not wise to undergo an elective cosmetic procedure during pregnancy and subject the baby to stresses that can be avoided until after delivery and nursing is complete.
Yes. Safety is not so much the issue. Why would you do lipo if you are planning pregnancy and will have weight gain? Your result will change.
Before not during. Having had prior liposuction will not interfere with pregnancy. It will not guarantee against weight gain however.