In January 2019, Buzzfeed announced it was laying off around 200 employees. The digital media company quickly came under fire for refusing to pay these workers their earned but unused paid time off (PTO).

The backlash, spurred by a public petition signed by current and former staffers, led Buzzfeed to reverse course. It eventually agreed to pay out earned PTO to all laid off employees.

The company’s initial decision to forego paying earned PTO might not garner goodwill (or great press), but it’s not uncommon. Similar to workers’ compensation programs, state law dictates how companies must handle this issue — and there’s no hard and fast rule across the U.S. about what happens to your PTO when you quit or are laid off. (For more information on workers’ compensation, check out this state-by-state guide.)

Find a Better Way to Work — Sign Up for a Leading Job Search Site >>

How Companies Structure Their PTO

Do You Understand Your Employee Rights? A company's policy is informed by state law. Depending on where you work, it may be illegal to refuse to pay out PTO days. Check out this guide to the basics and make sure that your boss isn't taking advantage of you. #careertips #careerEach company sets their own PTO policy, says Vicki Salemi, career expert at Monster.com. That policy generally outlines what happens to unused PTO if an employee is let go or quits. (If you are quitting, make sure you do these eight things first.)

Some companies pay their employees for the number of accrued PTO days at the time of layoffs; others do not.

“Policies differ by company, even when it’s a flexible policy with unlimited vacation days, so you can clarify that by getting schooled on what exactly ‘flexible’ means in terms of a payout if you’re laid off,” Salemi says.

Employees can typically find this information in their company’s benefits handbook or on its intranet or website. You can also speak to a human resources representative directly.

Am I Legally Entitled to Retroactive PTO?

A company’s policy is informed by state law. Depending on where you work, it may be illegal to refuse to pay out PTO days.

Seven states require payment for unused vacation following layoffs. Thirty-seven states require paid PTO if an employment contract stipulates this pay is issued upon severance or the company follows a vacation accrual system. The remaining six states don’t have legislation regarding PTO, which effectively leaves corporate policy to the employer’s discretion.

Struggling to Find Work? Get Help With Your Job Hunt >>

Knowing Your Rights

It’s important for employees and job seekers to know their rights before they take a job, Salemi says. When interviewing, ask about benefits. Here’s how to build your own benefits package. It may feel awkward since you don’t have the job secured, but it’s important information when weighing a job offer.

“Don’t be afraid to ask about accommodations like PTO, benefits, or even if there’s room for negotiation,” she said. “That time is money.”

Get any concession a company makes in writing. You don’t want to leave anything up to chance if something unfortunate happens.

What to Do If You Get Laid Off

If you lose your job due to layoffs, read the fine print of your original benefits package closely. If it specifies accrued PTO gets paid out, your company should uphold their end of the bargain.

“Your company should hopefully act with integrity and ethics,” Salemi says. Read the terms and conditions of any severance package you are offered as well. “See how and most importantly when your PTO will be paid,” she adds.

Layoffs are more common than you think, and it’s important to be prepared if you think your job is vulnerable. Here’s a guide to dealing with layoffs.

This article originally appeared on Policygenius.