nullpointer bug fix
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java b/src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java
index a048ecf..af5d8d8 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java
@@ -99,10 +99,9 @@
     public QuerySerializer setQuery(String query, String ql, String version)
             throws QueryException {
 
-        if (query.isEmpty())
+        if (query == null || query.isEmpty())
             throw new QueryException(406, "No Content!");
 
-
         try {
             if (ql.equalsIgnoreCase("poliqarp")) {
                 ast = new PoliqarpPlusTree(query);