diff --git a/cypher/convertQuery.go b/cypher/convertQuery.go
index 2f8be469aa9ef8b4dcd38fa099358a11e4d863bf..f15a3d365c655a8d92168ee6243caf2757f3b356 100644
--- a/cypher/convertQuery.go
+++ b/cypher/convertQuery.go
@@ -17,6 +17,10 @@ func (s *Service) ConvertQuery(totalJSONQuery *entity.IncomingQueryJSON) (*strin
 
 	query, rest, isRest := checkForQueryCluster(queryJSON)
 
+	if query == nil {
+		return nil, errors.New("Invalid query")
+	}
+
 	if isRest {
 		fmt.Println("Rest:")
 		fmt.Println(rest)