code: function assertObject(attr, data) {
    if (data === null || data === undefined) {
      return null;
    }
  
    if (typeof data !== 'object' || Array.isArray(data)) {
      throw new ParseError(`Attribute ${attr} must be of type "object"`);
    }
  
    return data;
  }
docs: Throws if the provided data is not an object.
  Returns the unmodified data if validated
  
  @throws
  @param {string} attr - tested attribute name
  @param {*} data
  @return {object}