module.exports.encode = function encode() {
  return new Buffer(1);
};

module.exports.encode = function encode(type) {
  if(type == null) {
    throw new Error('Type cannot be empty');
  }
  return new Buffer(1);
};

Throw Error when type is missing
Throw Error when type is missing
