code: public static LogicalOperator checkOperator(String value) throws IllegalArgumentException {
          boolean containsOr = value.contains(OR);
          boolean containsAnd = value.contains(AND);
          if (containsAnd && containsOr) {
              throw new IllegalArgumentException("Cannot merge AND and OR operators in the same query filter.");
          } else if (containsAnd && !containsOr) {
              return LogicalOperator.AND;
          } else if (containsOr && !containsAnd) {
              return LogicalOperator.OR;
          } else {    // !containsOr && !containsAnd
              return null;
          }
      }
docs: Checks that the filter value list contains only one type of operations.
  
  @param value List of values to check
  @return  The used operator. Null if no operator is used.
  @throws IllegalArgumentException if the list contains different operators.