Fix bugs reported by sonar

Fix bugs reported by sonar as critical, major, ...

Issue-ID: CLAMP-841
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Change-Id: I91723b83289e25d6e27b0c925107e50314f441fc
diff --git a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java
index b1aa4ad..418d3c2 100644
--- a/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java
+++ b/src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java
@@ -309,7 +309,7 @@
 
         if (TYPE_LIST.equalsIgnoreCase(type)) {
             property.addProperty(TYPE, "array");
-            if (cdsProperty.get(PROPERTIES) != null) {
+            if (cdsProperty != null && cdsProperty.get(PROPERTIES) != null) {
                 JsonObject dataObject = new JsonObject();
                 addDataFields(cdsProperty.get(PROPERTIES).getAsJsonObject(),
                               dataObject);