Undefined property: FieldCollectionItemEntity::
By allowing only if the value is set the error disappeared. 

if (isset($li[$li_id]-&gt;field_wa_thick['und']) {
  $wt = $li[$li_id]-&gt;field_wa_thick['und'][0]['value'];
}


Also applying the isset if the value is used elsewhere.