code: function(expectedType, value) {
    var actualType = getType(value);
    if (expectedType!== actualType) {
      throw new TypeError('Expected type to be ' +
        expectedType + ', but got ' + actualType);
    }
    return value;
  }
docs: String -> String -> a -> a