One thing no one expects when they're expecting is discrimination. Unfortunately, pregnancy discrimination is all too real. But that doesn't mean there's nothing you can do about it.

While there is blatant discrimination in the workplace, more often, it's covert. Luckily, there are federal laws in place that make it illegal to discriminate against pregnant women or those with children, but knowing your rights is key.

The federal Pregnancy Discrimination Act makes it unlawful for an employer with 15 or more employees to discriminate on the basis of pregnancy or a pregnancy-related condition. Some states, though not Virginia, have similar laws.

A June 2014 study published in the journal Gender and Society found that some employers fired pregnant employees, citing poor performance or violation of attendance policies, even when non-pregnant employers with similar performance were not terminated. In some cases, the employer cited a need for "restructuring" as the reason for termination, when, in fact, no restructuring occurred.

Federal law also makes it illegal to discriminate against pregnant women or those with children based on stereotypes. For instance, an employer couldn't decide not to give a job which requires a lot of travel to a pregnant woman based on the logic that "women with young children should be at home." Penalizing women (or men) even for paternalistic reasons is illegal.

Women that have difficult pregnancies that result in health problems, including postpartum depression, may be protected by the American's with Disabilities Act. Similarly, it is unlawful to retaliate against a woman for taking time off under the Family and Medical Leave Act, which applies to employers with 50 or more employees.

Here are five steps you can take to protect yourself at work:

1. Don't wait too long to tell your employer you are pregnant. This way if you are fired or demoted, you may be able to protect yourself with anti-discrimination laws. If you employer finds out you are pregnant before you announce it and fires you, it may be able to claim ignorance, even if the real reason for your termination is your pregnancy.

2. If you are still at work and believe that your employer is discriminating against you, report it -- in writing -- to human resources or your boss. If your employer has 15 or more employees, you may be protected by anti-retaliation law.

3. If you are fired or demoted, ask why. Ideally, get it in writing. See if the reason makes sense. For instance, if your employer claims that your position has been eliminated and then hires someone else, that looks a lot like pregnancy discrimination.

4. If you are having a difficult pregnancy, discuss with your doctor how this is affecting you at work. If your employer has 15 or more employees, under the American's with Disabilities Act, you may be entitled to ask for changes in the workplace -- called "reasonable accommodations" -- including more frequent breaks, lifting restrictions and time away from work for medical care. It is important that any request for accommodation be grounded in specifically how pregnancy is affecting your body. Ideally, your doctor can provide a letter explaining the issue to your employer.

5. Even if you do not plan to ask for changes at work, make sure that your boss or supervisor knows about health-related issues which you suffer from. This way, you may be protected if your employer later tries to fire or demote you. The bottom line is pregnancy discrimination can't be entirely avoided, but by taking these steps you can make it a lot easier to make your claim if it does happen.