how to check Object Reference?
<p>I have like this entity,</p>

<pre><code>public class Receiving{
  [Key]
  public int ID {get; set;}
  public string shipperID {get; set;}

  [Foregign("shipperID")]
  public virtual Shipper shipper {get; set;}
}
</code></pre>

<p>the Shipper relationship could be <strong>1:0 or 1:1</strong></p>

<p>and I got an error when the shipper is 0.</p>

<pre><code>var result = from p in productRepository
             join o in receivingRepository
             on p.fk equals o.ID
             select new {
               test = o.shipper.name // if the shipper is nothing related then it occur an error.
             }
</code></pre>

<p>The error message say,
<strong>"Object reference not set to an instance of an object."</strong></p>

<p>How can I check that in select {}?</p>

<p>I tried,</p>

<pre><code>select new {
  test = o.shipper.name ?? ""
}
</code></pre>

<p>but it is not working.</p>
