specbot: More carefully check for valid queries.