@Override
public Type union(Type t) {
// handle optimisable Null cases
if (t instanceof Null) return this;
if (t instanceof Maybe) {
Type ot=((Maybe)t).type;
if (ot==type) return this;
if (ot.contains(type)) return t;
if (type.contains(ot)) return this;
t=ot; // fall through, just consider the non-null case
}
if (type.contains(t)) return this;