Add slice type validation before running a query.