diff --git a/uuid.entity.inc b/uuid.entity.inc
index 50081c3..cdd01c8 100644
--- a/uuid.entity.inc
+++ b/uuid.entity.inc
@@ -414,6 +414,11 @@ function entity_get_uuid_by_id($entity_type, $ids, $revision = FALSE) {
     return array();
   }
 
+  // No support for the given entity type.
+  if (!$uuid_key) {
+    return array();
+  }
+
   // Get all UUIDs in one query.
   return db_select($table, 't')
     ->fields('t', array($id_key, $uuid_key))
