For most employees, there’s a way to check if their company is planning a layoff months before one takes place.