Index: UefiShellLib.c
===================================================================
--- UefiShellLib.c	(revision 16302)
+++ UefiShellLib.c	(working copy)
@@ -2078,8 +2078,7 @@
           ASSERT(GetItemValue == 0);
           break;
       }
-    } else if (GetItemValue != 0 && !InternalIsFlag(Argv[LoopCounter], AlwaysAllowNumbers, CurrentItemPackage->Type == TypeTimeValue)) {
-      ASSERT(CurrentItemPackage != NULL);
+    } else if (GetItemValue != 0 && CurrentItemPackage != NULL && !InternalIsFlag(Argv[LoopCounter], AlwaysAllowNumbers, (CONST BOOLEAN)(CurrentItemPackage->Type == TypeTimeValue))) {
       //
       // get the item VALUE for a previous flag
       //
