Print stack trace when a null query is sent