diff --git a/src/main/java/de/ids_mannheim/korap/KorapIndex.java b/src/main/java/de/ids_mannheim/korap/KorapIndex.java
index 685d268..e2cc91a 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapIndex.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapIndex.java
@@ -84,6 +84,10 @@
 
 /*
   TODO: Support layer for specific foundries (IMPORTANT)
+  TODO: Implement timeout!!!
+    - https://lucene.apache.org/core/2_9_4/api/all/org/apache/lucene/search/TimeLimitingCollector.html
+    - https://lucene.apache.org/core/2_9_4/api/all/org/apache/lucene/search/TimeLimitingCollector.html
+    - http://stackoverflow.com/questions/19557476/timing-out-a-query-in-solr
 
   TODO: Use FieldCache!
   TODO: Reuse the indexreader everywhere - it should be threadsafe!
diff --git a/src/main/java/de/ids_mannheim/korap/KorapQuery.java b/src/main/java/de/ids_mannheim/korap/KorapQuery.java
index b0ed21e..d05d4d2 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapQuery.java
@@ -161,7 +161,6 @@
 		if (json.has("exclude") && json.get("exclude").asBoolean())
 		    throw new QueryException("Exclusion is currently not supported in position operations");
 
-
 		return new SpanWithinQueryWrapper(
 		    this.fromJSON(operands.get(0)),
 		    this.fromJSON(operands.get(1)),
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAlterQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAlterQueryWrapper.java
index bc706f2..fd7c65d 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAlterQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAlterQueryWrapper.java
@@ -1,6 +1,7 @@
 package de.ids_mannheim.korap.query.wrap;
 
 import de.ids_mannheim.korap.query.wrap.SpanRegexQueryWrapper;
+import de.ids_mannheim.korap.query.wrap.SpanWildcardQueryWrapper;
 import de.ids_mannheim.korap.query.wrap.SpanSegmentQueryWrapper;
 import de.ids_mannheim.korap.query.wrap.SpanQueryWrapperInterface;
 
@@ -15,7 +16,7 @@
     private String field;
     private SpanQuery query;
     private List<SpanQuery> alternatives;
-
+    private boolean isNull = true;
 
     public SpanAlterQueryWrapper (String field) {
 	this.field = field;
@@ -26,26 +27,41 @@
 	this.field = field;
 	this.alternatives = new ArrayList<>();
 	for (String term : terms) {
+	    this.isNull = false;
 	    this.alternatives.add(new SpanTermQuery(new Term(this.field, term)));
 	};
     };
 
     public SpanAlterQueryWrapper or (String term) {
 	this.alternatives.add(new SpanTermQuery(new Term(this.field, term)));
+	this.isNull = false;
 	return this;
     };
 
     public SpanAlterQueryWrapper or (SpanQueryWrapperInterface term) {
+	if (term.isNull())
+	    return this;
 	this.alternatives.add( term.toQuery() );
+	this.isNull = false;
 	return this;
     };
 
     public SpanAlterQueryWrapper or (SpanRegexQueryWrapper term) {
 	this.alternatives.add( term.toQuery() );
+	this.isNull = false;
+	return this;
+    };
+
+    public SpanAlterQueryWrapper or (SpanWildcardQueryWrapper wc) {
+	this.alternatives.add( wc.toQuery() );
+	this.isNull = false;
 	return this;
     };
 
     public SpanQuery toQuery() {
+	if (this.isNull || this.alternatives.size() == 0)
+	    return (SpanQuery) null;
+	    
 	if (this.alternatives.size() == 1) {
 	    return (SpanQuery) this.alternatives.get(0);
 	};
@@ -57,4 +73,12 @@
 	};
 	return (SpanQuery) soquery;
     };
+
+    public boolean isOptional () {
+	return false;
+    };
+
+    public boolean isNull () {
+	return this.isNull;
+    };
 };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanClassQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanClassQueryWrapper.java
index 312c005..5a6c1a4 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanClassQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanClassQueryWrapper.java
@@ -33,9 +33,20 @@
     };
 
     public SpanQuery toQuery () {
+	if (this.subquery.isNull())
+	    return (SpanQuery) null;
+	
 	if (this.number == (byte) 0) {
 	    return new SpanClassQuery((SpanQuery) this.subquery.toQuery());
 	};
 	return new SpanClassQuery((SpanQuery) this.subquery.toQuery(), (byte) this.number);
     };
+
+    public boolean isOptional () {
+	return false;
+    };
+
+    public boolean isNull () {
+	return this.subquery.isNull();
+    };
 };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanElementQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanElementQueryWrapper.java
index acf0638..c5da7fc 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanElementQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanElementQueryWrapper.java
@@ -17,4 +17,12 @@
     public SpanQuery toQuery () {
 	return (SpanQuery) new SpanElementQuery(this.field, this.element);
     };
+
+    public boolean isOptional () {
+	return false;
+    };
+
+    public boolean isNull () {
+	return false;
+    };
 };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanMatchModifyQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanMatchModifyQueryWrapper.java
index aa25021..85926e2 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanMatchModifyQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanMatchModifyQueryWrapper.java
@@ -33,6 +33,16 @@
     };
 
     public SpanQuery toQuery () {
+	if (this.subquery.isNull())
+	    return (SpanQuery) null;
 	return new SpanMatchModifyClassQuery(this.subquery.toQuery(), this.number);
     };
+
+    public boolean isOptional () {
+	return false;
+    };
+
+    public boolean isNull () {
+	return this.subquery.isNull();
+    };
 };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQuantifierQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQuantifierQueryWrapper.java
index 521cb0a..4a29118 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQuantifierQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQuantifierQueryWrapper.java
@@ -8,6 +8,8 @@
 import de.ids_mannheim.korap.query.wrap.SpanQueryWrapperInterface;
 import org.apache.lucene.search.spans.SpanQuery;
 
+// This might be irrelevant now with repetition!
+
 public class SpanQuantifierQueryWrapper implements SpanQueryWrapperInterface {
     private String field;
 
@@ -19,6 +21,14 @@
 	return (SpanQuery) null;
     };
 
+    public boolean isOptional () {
+	return false;
+    };
+
+    public boolean isNull () {
+	return false;
+    };
+
 
     /*
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapperInterface.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapperInterface.java
index 035e867..b88af57 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapperInterface.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapperInterface.java
@@ -3,9 +3,10 @@
 import org.apache.lucene.search.spans.SpanQuery;
 
 // Todo: Make this an abstract class to deal with regexes in a parent abstract class!
-
-// Add optional and null attributes
+// Add warning and error
 
 public interface SpanQueryWrapperInterface {
     public SpanQuery toQuery ();
+    public boolean isOptional ();
+    public boolean isNull ();
 };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRegexQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRegexQueryWrapper.java
index 3cd4051..cf788dc 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRegexQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRegexQueryWrapper.java
@@ -8,6 +8,10 @@
 
 import java.util.*;
 
+/*
+  TODO: Don't allow queries like ".*?"!!!
+*/
+
 public class SpanRegexQueryWrapper {
     private SpanQuery query;
 
@@ -38,4 +42,12 @@
     public SpanQuery toQuery() {
 	return this.query;
     };
+
+    public boolean isOptional () {
+	return false;
+    };
+
+    public boolean isNull () {
+	return false;
+    };
 };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRepetitionQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRepetitionQueryWrapper.java
index 8ab2937..68ffb5b 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRepetitionQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRepetitionQueryWrapper.java
@@ -10,20 +10,49 @@
     private SpanQueryWrapperInterface subquery;
     private int min = 1;
     private int max = 1;
+    private boolean optional = false;
+    private boolean isNull = false;
 
     public SpanRepetitionQueryWrapper (SpanQueryWrapperInterface subquery, int exact) {
 	this.subquery = subquery;
+
+	if (exact < 1 || this.subquery.isNull()) {
+	    this.isNull = true;
+	    return;
+	};
+	
 	this.min = exact;
 	this.max = exact;
     };
 
     public SpanRepetitionQueryWrapper (SpanQueryWrapperInterface subquery, int min, int max) {
 	this.subquery = subquery;
+
+	if (this.subquery.isNull()) {
+	    this.isNull = true;
+	    return;
+	};
+	
+	if (min == 0) {
+	    this.optional = true;
+	    if (max == 0)
+		this.isNull = true;
+	};
 	this.min = min;
 	this.max = max;
     };
 
     public SpanQuery toQuery () {
+	if (this.isNull)
+	    return (SpanQuery) null;
 	return new SpanRepetitionQuery(this.subquery.toQuery(), this.min, this.max, true);
     };
+
+    public boolean isOptional () {
+	return this.optional;
+    };
+
+    public boolean isNull () {
+	return this.isNull;
+    };
 };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSegmentQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSegmentQueryWrapper.java
index e59316a..1d007c3 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSegmentQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSegmentQueryWrapper.java
@@ -25,6 +25,7 @@
     public ArrayList<SpanQuery> inclusive;
     public ArrayList<SpanQuery> exclusive;
     private String field;
+    private boolean isNull = true;
 
     /**
      * Constructor.
@@ -47,92 +48,119 @@
 	this(field);
 	for (int i = 0; i < terms.length; i++) {
 	    this.inclusive.add((SpanQuery) new SpanTermQuery(new Term(field, terms[i])));
+	    this.isNull = false;
 	};
     };
 
     public SpanSegmentQueryWrapper (String field, SpanRegexQueryWrapper re) {
 	this(field);
 	this.inclusive.add((SpanQuery) re.toQuery());
+	this.isNull = false;
     };
 
     public SpanSegmentQueryWrapper (String field, SpanAlterQueryWrapper alter) {
 	this(field);
-	this.inclusive.add((SpanQuery) alter.toQuery());
+	if (!alter.isNull()) {
+	    this.inclusive.add((SpanQuery) alter.toQuery());
+	    this.isNull = false;
+	};
     };
 
     public SpanSegmentQueryWrapper (String field, SpanSegmentQueryWrapper ssq) {
 	this(field);
 
-	Iterator<SpanQuery> clause = ssq.inclusive.iterator();
-	while (clause.hasNext()) {
-	    this.inclusive.add( (SpanQuery) clause.next().clone() );
-	};
+	if (!ssq.isNull()) {
+	    Iterator<SpanQuery> clause = ssq.inclusive.iterator();
+	    while (clause.hasNext()) {
+		this.inclusive.add( (SpanQuery) clause.next().clone() );
+	    };
 
-	clause = ssq.exclusive.iterator();
-	while (clause.hasNext()) {
-	    this.exclusive.add( (SpanQuery) clause.next().clone() );
+	    clause = ssq.exclusive.iterator();
+	    while (clause.hasNext()) {
+		this.exclusive.add( (SpanQuery) clause.next().clone() );
+	    };
+	    this.isNull = false;
 	};
     };
 
     public SpanSegmentQueryWrapper with (String term) {
 	this.inclusive.add(new SpanTermQuery(new Term(field, term)));
+	this.isNull = false;
 	return this;
     };
 
     public SpanSegmentQueryWrapper with (SpanRegexQueryWrapper re) {
 	this.inclusive.add((SpanQuery) re.toQuery());
+	this.isNull = false;
 	return this;
     };
 
     public SpanSegmentQueryWrapper with (SpanWildcardQueryWrapper wc) {
 	this.inclusive.add((SpanQuery) wc.toQuery());
+	this.isNull = false;
 	return this;
     };
 
     public SpanSegmentQueryWrapper with (SpanAlterQueryWrapper alter) {
-	this.inclusive.add((SpanQuery) alter.toQuery());
+	if (!alter.isNull()) {
+	    this.inclusive.add((SpanQuery) alter.toQuery());
+	    this.isNull = false;
+	};
 	return this;
     };
 
     // Identical to without
     public SpanSegmentQueryWrapper with (SpanSegmentQueryWrapper seg) {
-	for (SpanQuery sq : seg.inclusive) {
-	    this.inclusive.add(sq);
-	};
-	for (SpanQuery sq : seg.exclusive) {
-	    this.exclusive.add(sq);
+	if (!seg.isNull()) {
+	    for (SpanQuery sq : seg.inclusive) {
+		this.inclusive.add(sq);
+	    };
+	    for (SpanQuery sq : seg.exclusive) {
+		this.exclusive.add(sq);
+	    };
+	    this.isNull = false;
 	};
 	return this;
     };
 
     public SpanSegmentQueryWrapper without (String term) {
 	this.exclusive.add(new SpanTermQuery(new Term(field, term)));
+	this.isNull = false;
 	return this;
     };
 
     public SpanSegmentQueryWrapper without (SpanRegexQueryWrapper re) {
 	this.exclusive.add((SpanQuery) re.toQuery());
+	this.isNull = false;
 	return this;
     };
 
     public SpanSegmentQueryWrapper without (SpanWildcardQueryWrapper wc) {
 	this.exclusive.add((SpanQuery) wc.toQuery());
+	this.isNull = false;
 	return this;
     };
 
     public SpanSegmentQueryWrapper without (SpanAlterQueryWrapper alter) {
-	this.exclusive.add((SpanQuery) alter.toQuery());
+	if (!alter.isNull()) {
+	    this.exclusive.add((SpanQuery) alter.toQuery());
+	    this.isNull = false;
+	};
 	return this;
     };
 
     // Identical to with
     public SpanSegmentQueryWrapper without (SpanSegmentQueryWrapper seg) {
-	return this.with(seg);
+	if (!seg.isNull()) {
+	    this.with(seg);
+	    this.isNull = false;
+	};
+	return this;
     };
 
     public SpanQuery toQuery () {
-	if (this.inclusive.size() + this.exclusive.size() == 0) {
-	    return null;
+	if (this.isNull || (this.inclusive.size() + this.exclusive.size() == 0)) {
+	    return (SpanQuery) null;
 	}
 	else if (this.inclusive.size() >= 1 && this.exclusive.size() >= 1) {
 	    return (SpanQuery) new SpanNotQuery(
@@ -186,5 +214,13 @@
     public SpanSegmentQueryWrapper clone () {
 	return new SpanSegmentQueryWrapper(this.field, this);
     };
+
+    public boolean isOptional () {
+	return false;
+    };
+
+    public boolean isNull () {
+	return this.isNull;
+    };
 };
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java
index 5e1c91e..e3b755d 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java
@@ -9,6 +9,7 @@
 
 import de.ids_mannheim.korap.query.wrap.SpanSegmentQueryWrapper;
 import de.ids_mannheim.korap.query.wrap.SpanRegexQueryWrapper;
+import de.ids_mannheim.korap.query.wrap.SpanWildcardQueryWrapper;
 
 import org.apache.lucene.index.Term;
 import org.apache.lucene.search.spans.SpanQuery;
@@ -23,6 +24,7 @@
     private ArrayList<SpanQuery> segments;
     private ArrayList<DistanceConstraint> constraints;
     private boolean isInOrder = true;
+    private boolean isNull = true;
 
     public SpanSequenceQueryWrapper (String field) {
 	this.field = field;
@@ -34,21 +36,37 @@
 	for (int i = 0; i < terms.length; i++) {
 	    this.segments.add((SpanQuery) new SpanTermQuery(new Term(field, terms[i])));
 	};
+	this.isNull = false;
     };
 
     public SpanSequenceQueryWrapper (String field, SpanQuery sq) {
 	this(field);
 	this.segments.add((SpanQuery) sq);
+	this.isNull = false;
     };
 
     public SpanSequenceQueryWrapper (String field, SpanQueryWrapperInterface sswq) {
 	this(field);
-	this.segments.add((SpanQuery) sswq.toQuery());
+	if (!sswq.isNull()) {
+	    this.segments.add((SpanQuery) sswq.toQuery());
+	    this.isNull = false;
+	};
     };
 
     public SpanSequenceQueryWrapper (String field, SpanRegexQueryWrapper re) {
 	this(field);
-	this.segments.add((SpanQuery) re.toQuery());
+	if (!re.isNull()) {
+	    this.segments.add((SpanQuery) re.toQuery());
+	    this.isNull = false;
+	};
+    };
+
+    public SpanSequenceQueryWrapper (String field, SpanWildcardQueryWrapper wc) {
+	this(field);
+	if (!wc.isNull()) {
+	    this.segments.add((SpanQuery) wc.toQuery());
+	    this.isNull = false;
+	};
     };
 
     public SpanQuery get (int index) {
@@ -61,31 +79,61 @@
 
     public SpanSequenceQueryWrapper append (String term) {
 	this.segments.add((SpanQuery) new SpanTermQuery(new Term(field, term)));
+	this.isNull = false;
 	return this;
     };
 
     public SpanSequenceQueryWrapper append (SpanQueryWrapperInterface ssq) {
-	this.segments.add((SpanQuery) ssq.toQuery());
+	if (!ssq.isNull()) {
+	    this.segments.add((SpanQuery) ssq.toQuery());
+	    this.isNull = false;
+	};
 	return this;
     };
 
     public SpanSequenceQueryWrapper append (SpanRegexQueryWrapper srqw) {
-	this.segments.add((SpanQuery) srqw.toQuery());
+	if (!srqw.isNull()) {
+	    this.segments.add((SpanQuery) srqw.toQuery());
+	    this.isNull = false;
+	};
+	return this;
+    };
+    
+    public SpanSequenceQueryWrapper append (SpanWildcardQueryWrapper swqw) {
+	if (!swqw.isNull()) {
+	    this.segments.add((SpanQuery) swqw.toQuery());
+	    this.isNull = false;
+	};
 	return this;
     };
 
     public SpanSequenceQueryWrapper prepend (String term) {
 	this.segments.add(0, (SpanQuery) new SpanTermQuery(new Term(field, term)));
+	this.isNull = false;
 	return this;
     };
 
     public SpanSequenceQueryWrapper prepend (SpanSegmentQueryWrapper ssq) {
-	this.segments.add(0, (SpanQuery) ssq.toQuery());
+	if (!ssq.isNull()) {
+	    this.segments.add(0, (SpanQuery) ssq.toQuery());
+	    this.isNull = false;
+	};
 	return this;
     };
 
     public SpanSequenceQueryWrapper prepend (SpanRegexQueryWrapper re) {
-	this.segments.add(0, (SpanQuery) re.toQuery());
+	if (!re.isNull()) {
+	    this.segments.add(0, (SpanQuery) re.toQuery());
+	    this.isNull = false;
+	};
+	return this;
+    };
+
+    public SpanSequenceQueryWrapper prepend (SpanWildcardQueryWrapper swqw) {
+	if (!swqw.isNull()) {
+	    this.segments.add(0, (SpanQuery) swqw.toQuery());
+	    this.isNull = false;
+	};
 	return this;
     };
 
@@ -122,7 +170,7 @@
 
     
     public SpanQuery toQuery () {
-	if (this.segments.size() == 0) {
+	if (this.segments.size() == 0 || this.isNull) {
 	    return (SpanQuery) null;
 	};
 
@@ -204,4 +252,12 @@
 	    return false;
 	return true;
     };
+
+    public boolean isOptional () {
+	return false;
+    };
+
+    public boolean isNull () {
+	return this.isNull;
+    };
 };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWildcardQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWildcardQueryWrapper.java
index 7289bfa..94179f3 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWildcardQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWildcardQueryWrapper.java
@@ -28,4 +28,12 @@
     public SpanQuery toQuery() {
 	return this.query;
     };
+
+    public boolean isOptional () {
+	return false;
+    };
+
+    public boolean isNull () {
+	return false;
+    };
 };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithinQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithinQueryWrapper.java
index 4372fdf..fe6f9c2 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithinQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithinQueryWrapper.java
@@ -16,20 +16,36 @@
     private SpanQueryWrapperInterface element;
     private SpanQueryWrapperInterface wrap;
     private byte flag;
+    private boolean isNull = true;;
 
     public SpanWithinQueryWrapper (SpanQueryWrapperInterface element, SpanQueryWrapperInterface wrap) {
 	this.element = element;
 	this.wrap = wrap;
 	this.flag = (byte) SpanWithinQuery.WITHIN;
+	if (!element.isNull() && !wrap.isNull())
+	    this.isNull = false;
     };
 
     public SpanWithinQueryWrapper (SpanQueryWrapperInterface element, SpanQueryWrapperInterface wrap, byte flag) {
 	this.element = element;
 	this.wrap = wrap;
 	this.flag = flag;
+	if (!element.isNull() && !wrap.isNull())
+	    this.isNull = false;
     };
 
     public SpanQuery toQuery () {
+	if (this.isNull)
+	    return (SpanQuery) null;
+	
 	return new SpanWithinQuery(this.element.toQuery(), this.wrap.toQuery(), this.flag);
     };
+
+    public boolean isOptional () {
+	return false;
+    };
+
+    public boolean isNull () {
+	return this.isNull;
+    };
 };
