Prevent null treatments

Change-Id: Icd40ab7f986f9738d0445428cd1f0c9053ed4e88
diff --git a/core/api/src/main/java/org/onosproject/net/flow/DefaultFlowRule.java b/core/api/src/main/java/org/onosproject/net/flow/DefaultFlowRule.java
index 64ebcd9..c8f2e9c 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/DefaultFlowRule.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/DefaultFlowRule.java
@@ -344,7 +344,7 @@
 
         @Override
         public FlowRule.Builder withTreatment(TrafficTreatment treatment) {
-            this.treatment = treatment;
+            this.treatment = checkNotNull(treatment);
             return this;
         }