public bool employeeSinExist(Employee employee) { bool exist = false; if (employee.GetType() != typeof(ContractEmployee)) { exist = employees.Count(value => value.SocialInsuranceNumber == employee.SocialInsuranceNumber) == 0 ? false : true; } return exist; }