title: Entity Framework NullReferenceException calling ToArray() when calling SP and returned NULL in Result?
body: <p>I have a SP that return a List of decimal that sometimes is included Null and I recive NullRefrenceException</p>
  <pre><code>var estimationLastRoleRowResults = _databaseContext.Database.SqlQuery&lt;decimal&gt;(&quot;SELECT RowResult FROM ES.GetEstimationItemItems(@EstimationID, 4, @RoleNumber, 1, 1, 1, 1)&quot;,
  new SqlParameter(&quot;@EstimationID&quot;, item.ObjectID),
  new SqlParameter(&quot;@RoleNumber&quot;, item.RoleNumber - 1)).ToArray();
  </code></pre>
  <p>How can I solve this problem?</p>