maskValue(value, flags = {}) {
    // Convert it into the correct format.
    if (!value || (typeof value !== 'object')) {
      value = {
        value,
        maskName: this.component.inputMasks[0].label
      };
    }

    // If no value is provided, then set the defaultValue.
    if (!value.value) {
      const defaultValue = flags.noDefault ? this.emptyValue : this.defaultValue;
      if (Array.isArray(defaultValue)) {
        value.value = _.isObject(defaultValue[0]) ? defaultValue[0].value : defaultValue;
      } else {
        value.value = _.isObject(defaultValue) ? defaultValue.value : defaultValue;
      }
    }

    return value;
  }
Returns the mask value object (mutates value!).
@param {any} [value] - The value to convert to a mask value.
@param {any} [flags] - The flags to use when converting to a mask value.
@returns {*} - The value as a mask value.