When is it OK to ask a woman if she’s pregnant?

When is it ok to ask a woman if she's pregnant?