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