Throw exception in the query builder when given a value of type we don't know

JAVA-160 #fixes