I think we need 2 properties and make this.type always be string, and this._type (I propose this.inttype) always be int.
Then we could make fill the both fields disregarding of what has been passed as the type argument.
```js
// normalize this.inttype
this.inttype = typeof type === 'number' ? type : types[type];
// normalize this.type
Object.keys(types).forEach(function(type) {
  if (types[type] == this.inttype) { this.type = type; }
}, this);
```