SQOOP-3435: Avoid NullPointerException due to different JSONObject library in classpath

diff --git a/src/java/org/apache/sqoop/util/SqoopJsonUtil.java b/src/java/org/apache/sqoop/util/SqoopJsonUtil.java
index adf186b..9e8ba95 100644
--- a/src/java/org/apache/sqoop/util/SqoopJsonUtil.java
+++ b/src/java/org/apache/sqoop/util/SqoopJsonUtil.java
@@ -40,7 +40,8 @@
   }
 
   public static String getJsonStringforMap(Map<String, String> map) {
-    JSONObject pathPartMap = new JSONObject(map);
+    Map<String, String> mapToUse = (map == null) ? Collections.emptyMap() : map;
+    JSONObject pathPartMap = new JSONObject(mapToUse);
     return pathPartMap.toString();
   }