losing weight VS Trying

My husband and I have been trying for 2 months now. Iv also been trying to loss weight for about 5 months, Im worried that maybe that's why we are not pregnant yet! Is it ok to keep trying to lose weight while trying to get pregnant?