[PATCH v2] efi_loader: Improve the parameter check for QueryVariableInfo()