code: function assertArray(attr, data, type) {
    if (data === null || data === undefined) {
      return [];
    }
  
    if (!Array.isArray(data)) {
      throw new ParseError(`Attribute ${attr} must be of type "array"`);
    }
  
    const clone = [];
  
    for (const d of data) {
      if (d !== undefined && d !== null) {
        if (typeof d !== type) {
          throw new ParseError(`Attribute ${attr} must contain only values of type "${type}"`);
        }
  
        clone.push(d);
      }
    }
  
    return clone;
  }
docs: Throws if the provided data is not an array containing exclusively
  values of the specified "type"
  Returns a clone of the provided array if valid
  
  @throws
  @param {string} attr - tested attribute name
  @param {*} data
  @return {array}