diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php
index 4861138..ff53771 100644
--- a/core/lib/Drupal/Core/Entity/EntityManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityManager.php
@@ -10,6 +10,7 @@
 use Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException;
 use Drupal\Component\Plugin\Exception\PluginNotFoundException;
 use Drupal\Component\Utility\SafeMarkup;
+use Drupal\Component\Uuid\Uuid;
 use Drupal\Core\Cache\Cache;
 use Drupal\Core\Cache\CacheBackendInterface;
 use Drupal\Core\Config\Entity\ConfigEntityType;
@@ -1117,6 +1118,10 @@ protected function getDisplayModeOptions($display_type, $entity_type_id, $includ
    * {@inheritdoc}
    */
   public function loadEntityByUuid($entity_type_id, $uuid) {
+    // Return NULL for invalid UUIDs.
+    if (empty($uuid) || !Uuid::isValid($uuid)) {
+      return NULL;
+    }
     $entity_type = $this->getDefinition($entity_type_id);
 
     if (!$uuid_key = $entity_type->getKey('uuid')) {
@@ -1125,6 +1130,9 @@ public function loadEntityByUuid($entity_type_id, $uuid) {
 
     $entities = $this->getStorage($entity_type_id)->loadByProperties(array($uuid_key => $uuid));
 
+    if (empty($entities)) {
+      return NULL;
+    }
     return reset($entities);
   }
 
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
index 25b6a94..aeb4147 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
@@ -1818,6 +1818,37 @@ protected function getTestHandlerClass() {
     return get_class($this->getMockForAbstractClass('Drupal\Core\Entity\EntityHandlerBase'));
   }
 
+  /**
+   * Tests the loadEntityByUuid() method.
+   *
+   * @covers ::loadEntityByUuid
+   *
+   * @dataProvider providerTestLoadEntityByUuid
+   */
+  public function testloadEntityByUuid($entity_type_id, $uuid) {
+    $entity = $this->getMock('Drupal\Core\Entity\EntityTypeInterface');
+    $this->setUpEntityManager(array(
+      'apple' => $entity,
+      'banana' => $entity,
+    ));
+
+    $new_entity = $this->entityManager->loadEntityByUuid($entity_type_id, $uuid);
+    $this->assertNull($new_entity);
+  }
+
+  /**
+   * Provides test data for testloadEntityByUuid().
+   *
+   * @return array
+   *   Test data.
+   */
+  public function providerTestLoadEntityByUuid() {
+    return array(
+      array('apple', 2415),
+      array('banana', NULL),
+    );
+  }
+
 }
 
 /*
