function Attribute(options) {
  if (options) {
    if (typeof (options) !== 'object')
      throw new TypeError('options must be an object');
    if (options.type && typeof (options.type) !== 'string')
      throw new TypeError('options.type must be a string');
  } else {
    options = {};
  }

  this.type = options.type || '';
  this._vals = [];

  if (options.vals !== undefined && options.vals !== null)
    this.vals = options.vals;
}