code: public void validate(Query<? extends Entity> query, EntityType entityType) {
      query.getRules().forEach(queryRule -> validateQueryRule(queryRule, entityType));
    }
docs: Validates query based on the given entity type, converts query values to the expected type if
  necessary.
  
  @param query query
  @param entityType entity type
  @throws MolgenisValidationException if query is invalid