MdeModulePkg: Update IP4 driver to check for NULL pointer before using.