How can I determine if a $form (or $form_state) is an entity create/edit form When in a function (e.g. a hook_form_alter) is there a reliable way to determine if the form is an entity form and if so, what type of entity?
You can check if the form is an instance of EntityForm and then get the entity to check the entity type:

if ($form_state-&gt;getFormObject() instanceof \Drupal\Core\Entity\EntityFormInterface) {
  $entity_type = $form_state-&gt;getFormObject()-&gt;getEntity()-&gt;getEntityTypeId();
}