bmc: version: Skip version if it does not exist in the config

Change-Id: I1ea876183ff12dab8fc479c45f7b3a9eba50b56f
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/bmc/version-handler/version_handlers_builder.cpp b/bmc/version-handler/version_handlers_builder.cpp
index f27fa54..044f4e3 100644
--- a/bmc/version-handler/version_handlers_builder.cpp
+++ b/bmc/version-handler/version_handlers_builder.cpp
@@ -58,6 +58,11 @@
             }
             output.blobId = "/version/" + matches[1].str();
             /* version is required. */
+            if (!item.contains("version"))
+            {
+                continue;
+            }
+
             const auto& v = item.at("version");
             /* version must have handler */
             const auto& h = v.at("handler");