Yes, it is fine, you can not overdose on B vitamins, they are water-soluable and your body excretes what it does not need.
docor asked me to take folic acid before getting pregnent.Most sites recommend taking 400 mcg (0.4 mg) of folic acid.But i got 5mg folic acid tablet from the shop.Is it ok?