Checks for inequality of two QueryTrees.
Checks for inequality of a QueryTree with a value of the same type (e.g. useful to check for constants).