Fix issue with importing PR without description

Some fields of the Github pull request are not mandatory (for example
description) make sure that importing pull request with such fields will
not cause null pointer exception.

Bug: Issue 15225
Change-Id: I28d9178d2896da8e0395269f974e54ea11d7cccb
diff --git a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java
index f536c70..e47f161 100644
--- a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java
+++ b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java
@@ -102,8 +102,8 @@
           for (GHPullRequest pr : repoEntry.getValue()) {
             JsonObject prObj = new JsonObject();
             prObj.add("id", new JsonPrimitive(new Integer(pr.getNumber())));
-            prObj.add("title", new JsonPrimitive(pr.getTitle()));
-            prObj.add("body", new JsonPrimitive(pr.getBody()));
+            prObj.add("title", new JsonPrimitive(Strings.nullToEmpty(pr.getTitle())));
+            prObj.add("body", new JsonPrimitive(Strings.nullToEmpty(pr.getBody())));
             prObj.add(
                 "author", new JsonPrimitive(pr.getUser() == null ? "" : pr.getUser().getLogin()));
             prObj.add("status", new JsonPrimitive(pr.getState().name()));