Actually it's one of the safest of all the nutrients. A European Commission study to identify the upper limit for vitamin supplements found an upper limit for every other Vitamin but declared that B12 is safe at any level. It's safe in your diet, it's safe when taken as a supplement, and it's safe hen recorded in the blood.
This is the important question. As you kno, with most supplements, you need permission to take them during pregnancy or when nursing.
By all means ask your doctor, midwife or health visitor, but the answer is YES.
B12 is vital for the healthy development of a baby, just as it was important to maintaining the hormone cycles and uterus repair that allowed you to get pregnant in the first place. B12 is vital for development of the nervous tissue, which happens in the first trimester of pregnancy, and for the ongoing development of the baby throughout pregnancy.
It's also valuable for your own well-being as a mother. The typical tendency of mammalian mothers is to give the baby what it needs at great cost to the mother, so if there isn't enough B12 to go around then the mother will typically suffer from a shortage (the baby may also suffer if there isn't enough for a rapidly growing baby). People we've put on to B12 replacement therapy during pregnancy have reported less morning sickness, much less nausea, more energy, and no post-natal depression. But before you get depressed that you didn't start earlier, it's never too late.
It's difficult to be sure what's due to B12 deficiency and what's due to something else, but babies from the same mother have been: