Empty queries should not cause crashes.