query is not nil when no query appended, but a empty string