query can never be nil. in the current case it is a required param, in the case above it will always be {} if omitted.