ShellPkg/for: Fix potential null pointer deference