code: public boolean areParamsValid() {
          if (queryType == QueryType.COUNT) {
              if (eventCollection == null || eventCollection.isEmpty()) {
                  return false;
              }
          }
  
          if (queryType == QueryType.COUNT_UNIQUE
                  || queryType == QueryType.MINIMUM || queryType == QueryType.MAXIMUM
                  || queryType == QueryType.AVERAGE || queryType == QueryType.MEDIAN
                  || queryType == QueryType.PERCENTILE || queryType == QueryType.SUM
                  || queryType == QueryType.SELECT_UNIQUE || queryType == QueryType.STANDARD_DEVIATION) {
  
              if (eventCollection == null || eventCollection.isEmpty() || targetProperty == null || targetProperty.isEmpty()) {
                  return false;
              }
          }
  
          if (queryType == QueryType.PERCENTILE) {
              return percentile != null;
          }
  
          return true;
      }
docs: Verifies whether the parameters are valid, based on the input query name.
  
  @return       whether the parameters are valid.