Add type to .toQuery return.