diff --git a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java
index 1859a4d..1e35ad6 100644
--- a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java
+++ b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicy.java
@@ -183,18 +183,20 @@
 
     /**
      * Return a map containing all Guard policies indexed by Guard policy Name.
-     * 
+     *
      * @return The Guards map
      */
     public Map<String, String> createGuardPolicyPayloads() {
         Map<String, String> result = new HashMap<>();
 
-        JsonObject guard = new JsonObject();
         JsonElement guardsList = this.getConfigurationsJson().get("guard_policies");
-        for (Entry<String, JsonElement> guardElem : guardsList.getAsJsonObject().entrySet()) {
-            guard.addProperty("policy-id", guardElem.getKey());
-            guard.add("contents", guardElem.getValue());
-            result.put(guardElem.getKey(), new GsonBuilder().create().toJson(guard));
+        if (guardsList != null) {
+            for (Entry<String, JsonElement> guardElem : guardsList.getAsJsonObject().entrySet()) {
+                JsonObject guard = new JsonObject();
+                guard.addProperty("policy-id", guardElem.getKey());
+                guard.add("contents", guardElem.getValue());
+                result.put(guardElem.getKey(), new GsonBuilder().create().toJson(guard));
+            }
         }
         return result;
     }
diff --git a/src/test/java/org/onap/clamp/policy/microservice/OperationalPolicyPayloadTest.java b/src/test/java/org/onap/clamp/policy/microservice/OperationalPolicyPayloadTest.java
index 739708ca..76e29c3 100644
--- a/src/test/java/org/onap/clamp/policy/microservice/OperationalPolicyPayloadTest.java
+++ b/src/test/java/org/onap/clamp/policy/microservice/OperationalPolicyPayloadTest.java
@@ -48,17 +48,28 @@
     }
 
     @Test
+    public void testGuardPolicyEmptyPayloadConstruction() throws IOException {
+        JsonObject jsonConfig = new GsonBuilder().create().fromJson(
+            ResourceFileUtil.getResourceAsString("tosca/operational-policy-no-guard-properties.json"),
+            JsonObject.class);
+        OperationalPolicy policy = new OperationalPolicy("testPolicy", null, jsonConfig);
+        Map<String, String> guardsMap = policy.createGuardPolicyPayloads();
+        assertThat(guardsMap).isEmpty();
+        assertThat(guardsMap.entrySet()).isEmpty();
+    }
+
+    @Test
     public void testGuardPolicyPayloadConstruction() throws IOException {
         JsonObject jsonConfig = new GsonBuilder().create().fromJson(
             ResourceFileUtil.getResourceAsString("tosca/operational-policy-properties.json"), JsonObject.class);
         OperationalPolicy policy = new OperationalPolicy("testPolicy", null, jsonConfig);
 
-        Map<String, String> guardsList = policy.createGuardPolicyPayloads();
+        Map<String, String> guardsMap = policy.createGuardPolicyPayloads();
 
         JSONAssert.assertEquals(ResourceFileUtil.getResourceAsString("tosca/guard1-policy-payload.json"),
-            guardsList.get("guard1"), false);
+            guardsMap.get("guard1"), false);
 
         JSONAssert.assertEquals(ResourceFileUtil.getResourceAsString("tosca/guard2-policy-payload.json"),
-            guardsList.get("guard2"), false);
+            guardsMap.get("guard2"), false);
     }
 }
diff --git a/src/test/resources/tosca/operational-policy-no-guard-properties.json b/src/test/resources/tosca/operational-policy-no-guard-properties.json
new file mode 100644
index 0000000..30c0440
--- /dev/null
+++ b/src/test/resources/tosca/operational-policy-no-guard-properties.json
@@ -0,0 +1,35 @@
+{
+	"operational_policy": {
+		"controlLoop": {
+			"trigger_policy": "new",
+			"timeout": "0",
+			"abatement": "on",
+			"controlLoopName": "LOOP_iYTIP_v1_0_ResourceInstanceName1_tca"
+		},
+		"policies": [
+			{
+				"id": "new",
+				"recipe": "Restart",
+				"retry": "10",
+				"timeout": "10",
+				"actor": "SO",
+				"payload": "",
+				"success": "",
+				"failure": "",
+				"failure_timeout": "",
+				"failure_retries": "",
+				"failure_exception": "",
+				"failure_guard": "",
+				"target": {
+					"type": "VM",
+					"resourceId": "",
+					"modelInvariantId": "",
+					"modelVersionId": "",
+					"modelName": "",
+					"modelVersion": "",
+					"modelCustomizationId": ""
+				}
+			}
+		]
+	}
+}
\ No newline at end of file
