Using IllegalArgumentException type to indicate malformed query expression