Dying hair while pregnant?

Cr

So I hear a lot of people saying you shouldn’t dye your hair while pregnant? Does anyone follow that or is it just a myth? Thank you!