This is my code..I cant add a null value to the list.Getting null reference exception.how to avoid it
List<string> lst = new List<string>();
 var empPersonal = context.tblEmployeePersonalDetails.Where(x => x.isDelete == false && x.empId == id).First();
lst.Add(empPersonal.gender.ToString() != null ? empPersonal.gender.ToString() :string.Empty);
 
     
     
    