diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php
index 42e475a..55de2be 100644
--- a/core/lib/Drupal/Core/Entity/EntityManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityManager.php
@@ -10,9 +10,11 @@
 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;
+use Drupal\Core\Database\InvalidQueryException;
 use Drupal\Core\DependencyInjection\ClassResolverInterface;
 use Drupal\Core\Entity\Exception\AmbiguousEntityClassException;
 use Drupal\Core\Entity\Exception\NoCorrespondingEntityClassException;
@@ -1120,15 +1122,26 @@ protected function getDisplayModeOptions($display_type, $entity_type_id, $includ
    * {@inheritdoc}
    */
   public function loadEntityByUuid($entity_type_id, $uuid) {
+    // Throw InvalidQueryException for invalid UUIDs.
+    // @todo: Remove this check if we adopt validation constraints for UUIDs at
+    // another layer of the query.
+    // @see https://www.drupal.org/node/1805576
+    // @see https://www.drupal.org/node/2491989
+    if (empty($uuid) || !is_string($uuid) || !Uuid::isValid($uuid)) {
+      throw new InvalidQueryException('Invalid UUID: ' . print_r($uuid, TRUE));
+    }
+    // Make sure the entity definition includes UUIDs.
     $entity_type = $this->getDefinition($entity_type_id);
-
     if (!$uuid_key = $entity_type->getKey('uuid')) {
       throw new EntityStorageException("Entity type $entity_type_id does not support UUIDs.");
     }
-
+    // Perform the query.
     $entities = $this->getStorage($entity_type_id)->loadByProperties(array($uuid_key => $uuid));
-
-    return reset($entities);
+    // Return the result if there is one.
+    if (!empty($entities)) {
+      return reset($entities);
+    }
+    return NULL;
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php
index 7b180d2..bd77a11 100644
--- a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php
@@ -466,6 +466,8 @@ public function getFormModeOptions($entity_type_id, $include_disabled = FALSE);
    * @return \Drupal\Core\Entity\EntityInterface|null
    *   The entity object, or NULL if there is no entity with the given UUID.
    *
+   * @throws \Drupal\Core\Database\InvalidQueryException
+   *   Thrown when the UUID is malformed.
    * @throws \Drupal\Core\Entity\EntityStorageException
    *   Thrown in case the requested entity type does not support UUIDs.
    */
diff --git a/core/modules/system/src/Tests/Entity/EntityUUIDTest.php b/core/modules/system/src/Tests/Entity/EntityUUIDTest.php
index 48a6e4e..e1b3c40 100644
--- a/core/modules/system/src/Tests/Entity/EntityUUIDTest.php
+++ b/core/modules/system/src/Tests/Entity/EntityUUIDTest.php
@@ -100,5 +100,11 @@ protected function assertCRUD($entity_type) {
     }
     $entity_duplicate->save();
     $this->assertNotEqual($entity->id(), $entity_duplicate->id());
+
+    // Verify that \Drupal::entityManager()->loadEntityByUuid() returns NULL
+    // for a non-existent UUID.
+    $non_existent_uuid = \Drupal::service('uuid')->generate();
+    $non_existent_entity = \Drupal::entityManager()->loadEntityByUuid($entity_type, $non_existent_uuid);
+    $this->assertNull($non_existent_entity);
   }
 }
diff --git a/core/tests/Drupal/Tests/Component/Uuid/UuidTest.php b/core/tests/Drupal/Tests/Component/Uuid/UuidTest.php
index 353c352..074a78e 100644
--- a/core/tests/Drupal/Tests/Component/Uuid/UuidTest.php
+++ b/core/tests/Drupal/Tests/Component/Uuid/UuidTest.php
@@ -96,6 +96,7 @@ public function providerTestValidation() {
       // These are invalid UUIDs.
       array('0ab26e6b-f074-4e44-9da-601205fa0e976', FALSE, 'Invalid format was validated'),
       array('0ab26e6b-f074-4e44-9daf-1205fa0e9761f', FALSE, 'Invalid length was validated'),
+      array(NULL, FALSE, 'NULL UUID was validated'),
     );
   }
 }
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
index 11b7ced..c982619 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
@@ -10,6 +10,7 @@
 use Drupal\Component\Plugin\Discovery\DiscoveryInterface;
 use Drupal\Component\Plugin\Exception\PluginNotFoundException;
 use Drupal\Core\Config\Entity\ConfigEntityStorage;
+use Drupal\Core\Database\InvalidQueryException;
 use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
 use Drupal\Core\Entity\ContentEntityInterface;
 use Drupal\Core\Entity\EntityHandlerBase;
@@ -1818,6 +1819,215 @@ protected function getTestHandlerClass() {
     return get_class($this->getMockForAbstractClass('Drupal\Core\Entity\EntityHandlerBase'));
   }
 
+  /**
+   * Provides test data for testloadEntityByUuid() and its friends.
+   *
+   * @return array
+   *   - An entity type ID.
+   *   - A UUID.
+   */
+  public function providerLoadEntityByUuid() {
+    return array(
+      array('apple', '6d286553-59ae-409a-887d-ee75df67b834'),
+    );
+  }
+
+  /**
+   * Tests loadEntityByUuid() for UUIDs which are supported and exist.
+   *
+   * @covers ::loadEntityByUuid
+   *
+   * @dataProvider providerLoadEntityByUuid
+   */
+  public function testloadEntityByUuid($entity_type_id, $uuid) {
+    // Mock the entity type.
+    $entity_type = $this->getMockBuilder('Drupal\Core\Entity\EntityTypeInterface')
+      ->setMethods(['getKey'])
+      ->getMockForAbstractClass();
+    $entity_type->expects($this->once())
+      ->method('getKey')
+      ->with('uuid')
+      ->willReturn('uuid');
+
+    // Mock the entity storage.
+    $entity_storage = $this->getMockBuilder('Drupal\Core\Entity\EntityStorageInterface')
+      ->setMethods(['loadByProperties'])
+      ->getMockForAbstractClass();
+    // Have loadByProperties() return an array with a single string which we
+    // construct.
+    $entity_storage->expects($this->once())
+      ->method('loadByProperties')
+      ->willReturn(['this entity contains uuid: ' . $uuid]);
+
+    // Mock the manager.
+    $manager = $this->getMockBuilder('Drupal\Core\Entity\EntityManager')
+      ->setMethods(['getDefinition', 'getStorage'])
+      ->disableOriginalConstructor()
+      ->getMock();
+    $manager->expects($this->once())
+      ->method('getDefinition')
+      ->willReturn($entity_type);
+    $manager->expects($this->once())
+      ->method('getStorage')
+      ->with($entity_type_id)
+      ->willReturn($entity_storage);
+
+    $this->assertEquals(
+      'this entity contains uuid: ' . $uuid,
+      $manager->loadEntityByUuid($entity_type_id, $uuid)
+    );
+  }
+
+  /**
+   * Tests loadEntityByUuid() for UUIDs which don't exist in the database.
+   *
+   * Verifes that when
+   * Drupal\Core\Entity\EntityStorageInterface::loadByProperties() returns an
+   * empty array, loadEntityByUuid() returns NULL.
+   *
+   * @covers ::loadEntityByUuid
+   *
+   * @dataProvider providerLoadEntityByUuid
+   */
+  public function testloadEntityByUuidDoesNotExist($entity_type_id, $uuid) {
+    // Mock the entity type.
+    $entity_type = $this->getMockBuilder('Drupal\Core\Entity\EntityTypeInterface')
+      ->setMethods(['getKey'])
+      ->getMockForAbstractClass();
+    $entity_type->expects($this->once())
+      ->method('getKey')
+      ->with('uuid')
+      ->willReturn('uuid');
+
+    // Mock the entity storage.
+    $entity_storage = $this->getMockBuilder('Drupal\Core\Entity\EntityStorageInterface')
+      ->setMethods(['loadByProperties'])
+      ->getMockForAbstractClass();
+    // Make sure we return an empty array of entities.
+    $entity_storage->expects($this->once())
+      ->method('loadByProperties')
+      ->willReturn([]);
+
+    // Mock the manager.
+    $manager = $this->getMockBuilder('Drupal\Core\Entity\EntityManager')
+      ->setMethods(['getDefinition', 'getStorage'])
+      ->disableOriginalConstructor()
+      ->getMock();
+    $manager->expects($this->once())
+      ->method('getDefinition')
+      ->willReturn($entity_type);
+    $manager->expects($this->once())
+      ->method('getStorage')
+      ->with($entity_type_id)
+      ->willReturn($entity_storage);
+
+    $this->assertNull($manager->loadEntityByUuid($entity_type_id, $uuid));
+  }
+
+  /**
+   * Tests loadEntityByUuid() where UUIDs are not supported.
+   *
+   * Verify that loadEntityByUuid() throws a
+   * Drupal\Core\Entity\EntityStorageException if the entity type does not
+   * support UUIDs.
+   *
+   * @covers ::loadEntityByUuid
+   *
+   * @expectedException \Drupal\Core\Entity\EntityStorageException
+   *
+   * @dataProvider providerLoadEntityByUuid
+   *
+   * @see \Drupal\Core\Entity\EntityTypeInterface::getKey()
+   */
+  public function testloadEntityByUuidNotSupported($entity_type_id, $uuid) {
+    // Mock the entity type.
+    $entity_type = $this->getMockBuilder('Drupal\Core\Entity\EntityTypeInterface')
+      ->setMethods(['getKey'])
+      ->getMockForAbstractClass();
+    // Make sure that the UUID key does not exist.
+    $entity_type->expects($this->once())
+      ->method('getKey')
+      ->with('uuid')
+      ->willReturn(FALSE);
+
+    // Mock the manager.
+    $manager = $this->getMockBuilder('Drupal\Core\Entity\EntityManager')
+      ->setMethods(['getDefinition', 'getStorage'])
+      ->disableOriginalConstructor()
+      ->getMock();
+    $manager->expects($this->once())
+      ->method('getDefinition')
+      ->willReturn($entity_type);
+    $manager->expects($this->never())
+      ->method('getStorage');
+
+    // We don't make an assertion here because we're expecting an exception.
+    $manager->loadEntityByUuid($entity_type_id, $uuid);
+  }
+
+  /**
+   * Data provider for testloadEntityByUuidBadUuid().
+   *
+   * @return array
+   *   - Entity type.
+   *   - Malformed UUID.
+   *
+   * @see \Drupal\Tests\Component\Uuid\UuidTest::providerTestValidation()
+   */
+  public function providerLoadEntityByUuidBadUuid() {
+    return [
+      ['type', '0ab26e6b-f074-4e44-9da-601205fa0e976'],
+      ['type', '0ab26e6b-f074-4e44-9daf-1205fa0e9761f'],
+      ['type', NULL],
+      ['type', 23],
+      ['type', []],
+      ['type', ['not empty array']],
+    ];
+  }
+
+  /**
+   * Test that loadEntityByUuid() throws InvalidQueryException for bad UUIDs.
+   *
+   * @covers ::loadEntityByUuid
+   *
+   * @expectedException \Drupal\Core\Database\InvalidQueryException
+   *
+   * @dataProvider providerLoadEntityByUuidBadUuid
+   */
+  public function testloadEntityByUuidBadUuid($entity_type_id, $bad_uuid) {
+    // Mock the entity type.
+    $entity_type = $this->getMockBuilder('Drupal\Core\Entity\EntityTypeInterface')
+      ->setMethods(['getKey'])
+      ->getMockForAbstractClass();
+    $entity_type->expects($this->never())
+      ->method('getKey');
+
+    // Mock the entity storage.
+    $entity_storage = $this->getMockBuilder('Drupal\Core\Entity\EntityStorageInterface')
+      ->setMethods(['loadByProperties'])
+      ->getMockForAbstractClass();
+    // Make sure we return a non-NULL mock entity, even though it will never be
+    // called.
+    $entity_storage->expects($this->never())
+      ->method('loadByProperties')
+      ->willReturn(['I am an entity.']);
+
+    // Mock the manager.
+    $manager = $this->getMockBuilder('Drupal\Core\Entity\EntityManager')
+      ->setMethods(['getDefinition', 'getStorage'])
+      ->disableOriginalConstructor()
+      ->getMock();
+    $manager->expects($this->never())
+      ->method('getDefinition')
+      ->willReturn($entity_type);
+    $manager->expects($this->never())
+      ->method('getStorage')
+      ->with($entity_type_id)
+      ->willReturn($entity_storage);
+
+    $manager->loadEntityByUuid($entity_type_id, $bad_uuid);
+  }
+
 }
 
 /*
