convert(field, value) {

    if (!this.hasField(field) || value === null || value === undefined) {
      return null;
    }

    let dataType = this.getDataTypeOf(field);

    if (this.isFieldArray(field)) {
      return (value instanceof Array ? value : [value]).map(v => dataType.convert(v));
    }

    return dataType.convert(value);

  }
Converts a value to its intended format based on its field. Returns null if field not found.
@param {string} field The field to use for conversion data
@param {any} value The value to convert