diff --git a/core/modules/entity/entity.class.inc b/core/modules/entity/entity.class.inc
index 5f0552e..8a26763 100644
--- a/core/modules/entity/entity.class.inc
+++ b/core/modules/entity/entity.class.inc
@@ -167,7 +167,7 @@ class Entity implements EntityInterface {
    * Implements EntityInterface::id().
    */
   public function id() {
-    return $this->id;
+    return isset($this->id) ? $this->id : NULL;
   }
 
   /**
diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module
index 0bd31ef..401b5e1 100644
--- a/core/modules/taxonomy/taxonomy.module
+++ b/core/modules/taxonomy/taxonomy.module
@@ -1532,7 +1532,7 @@ function taxonomy_field_presave($entity_type, $entity, $field, $instance, $langc
   foreach ($items as $delta => $item) {
     if ($item['tid'] == 'autocreate') {
       $term = entity_create('taxonomy_term', $item);
-      unset($term->tid);
+      $term->enforceIsNew();
       $term->langcode = $langcode;
       taxonomy_term_save($term);
       $items[$delta]['tid'] = $term->tid;
