Check type of query to match spec.