Making QueryBuilder fail when there are no types.