What are valid entity_id and entity_type values for node content?
This error can be caused by having a term reference field that references a deleted term. This reference is not deleted when a term is deleted.

You can check if this is the case using this query

SELECT nid, title from node WHERE nid 
   IN (select entity_id from  field_data_field_some_ref 
   WHERE field_some_ref_tid not IN (select tid from taxonomy_term_data))


https://www.drupal.org/node/1778572#comment-7256200

There are other cases where this error can occur. Read the issue comments in the link for more info.