NPE fix for groups command without the use of 'any'

Change-Id: I59dc93ac4e4bef98141b8abe377ae2fbfe5d7d1a
diff --git a/cli/src/main/java/org/onosproject/cli/net/GroupsListCommand.java b/cli/src/main/java/org/onosproject/cli/net/GroupsListCommand.java
index 610a6bf..be50a39 100644
--- a/cli/src/main/java/org/onosproject/cli/net/GroupsListCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/GroupsListCommand.java
@@ -104,7 +104,7 @@
                 new TreeMap<>(Comparators.ELEMENT_COMPARATOR);
         List<Group> groups;
         GroupState s = null;
-        if (!"any".equals(state)) {
+        if (state != null && !"any".equals(state)) {
             s = GroupState.valueOf(state.toUpperCase());
         }
         Iterable<Device> devices = deviceService.getDevices();