diff --git a/source/Playnite/Database/GameDatabase.cs b/source/Playnite/Database/GameDatabase.cs
index 6f102e13c..5e85da61c 100644
--- a/source/Playnite/Database/GameDatabase.cs
+++ b/source/Playnite/Database/GameDatabase.cs
@@ -775,14 +775,19 @@ public static string GetFullDbPath(string path)
             }
         }
 
-        public static bool GetMigrationRequired(string path)
+        public static bool GetMigrationRequired(string databasePath)
         {
-            if (path.EndsWith(".db", StringComparison.OrdinalIgnoreCase))
+            if (string.IsNullOrEmpty(databasePath))
+            {
+                throw new ArgumentNullException(nameof(databasePath));
+            }
+
+            if (databasePath.EndsWith(".db", StringComparison.OrdinalIgnoreCase))
             {
                 return true;
             }
 
-            var fullPath = GetFullDbPath(path);
+            var fullPath = GetFullDbPath(databasePath);
             var settingsPath = Path.Combine(fullPath, "database.json");
             if (!File.Exists(settingsPath))
             {