title: Linq Lambda Expression to check null or empty
body: <p>Im new to Linq and Lambda expressions and I wanted to change this piece of code:</p>
  
  <pre><code>    if (string.IsNullOrEmpty(model.PictureUrl1) &amp;&amp; string.IsNullOrEmpty(model.Picture2Url) &amp;&amp;
          string.IsNullOrEmpty(model.Picture3Url) &amp;&amp; string.IsNullOrEmpty(model.Picture4Url) &amp;&amp;
          string.IsNullOrEmpty(model.Picture5Url) &amp;&amp; string.IsNullOrEmpty(model.Picture6Url))
          return Content("");
  </code></pre>
  
  <p>Now I refactored that model to have an object with those properties and a list of said objects:</p>
  
  <pre><code>public class PublicInfoModelItem 
  {
      public string PictureUrl { get; set; }
      public string Text { get; set; }
      public string Link { get; set; }
  }
  </code></pre>
  
  <p>And the list:</p>
  
  <pre><code>public List&lt;PublicInfoModelItem&gt; ListOfImages = new List&lt;PublicInfoModelItem&gt;();
  </code></pre>
  
  <p>Model:</p>
  
  <pre><code>public class PublicInfoModel 
  {
      public List&lt;PublicInfoModelItem&gt; ListOfImages = new List&lt;PublicInfoModelItem&gt;();
  
      public string Container { get; set; }
  
      public int TemplateId { get; set; }
  
      public PublicInfoModelItem InfoModelItem { get; set; }
  
  }
  </code></pre>
  
  <p>And I was thinking a Lambda expression, something like:</p>
  
  <pre><code>    var result = model.ListOfImages.Where(x =&gt; string.IsNullOrEmpty(x.PictureUrl)).ToList();
      if (result == null)
      {
          return Content("");
      }
  </code></pre>
  
  <p>I dont know if the above expression is correct or it could be improved.</p>