diff --git a/scripts/Windows/Scripts/SetupConfig.ps1 b/scripts/Windows/Scripts/SetupConfig.ps1
index e32e2640..d720961e 100644
--- a/scripts/Windows/Scripts/SetupConfig.ps1
+++ b/scripts/Windows/Scripts/SetupConfig.ps1
@@ -84,7 +84,13 @@ $null = New-Module {
         Gets the name of the current setup stage.
     #>
     function Get-Stage {
-        return [SetupStage](Get-SetupOption $stageOption);
+        $stage = Get-SetupOption $stageOption;
+
+        if ($null -ne $stage) {
+            $stage = [SetupStage]$stage;
+        }
+
+        return $stage;
     }
 
     <#
@@ -99,7 +105,7 @@ $null = New-Module {
             $Name
         )
 
-        if (-not ($Name -is [string])) {
+        if (-not (($null -eq $Name) -or ($Name -is [string]))) {
             $Name = ([SetupStage]$Name).ToString();
         }