code: function coerceDate(value) {
      if (value instanceof Date) {
          return value;
      }
  
      let timestamp = Date.parse(value);
  
      if (!isNaN(timestamp)) {
          return new Date(timestamp);
      }
  
      return value;
  }
docs: Tries to convert the value to Date. First it try to parse it and if it gets a number,
  the Date constructor will be fed with that.
  
  @param {*} value
  @returns {*}