Support entities that are neither content nor config entites
Modification of https://www.drupal.org/files/issues/2019-05-29/3042467-31.patch that fixes PHP Exception for pattern in deprecation notice. See corresponding patch at https://www.drupal.org/project/drupal/issues/3042467#comment-13917262