masturbation okay?

Is masturbation okay when pregnant or ttc? wouldn't want to mess up chances of a healthy baby