function metersToMiles(meters) {
  if (typeof meters !== 'number') {
    return null;
  }
  return meters / 1000 * 0.621371;
}
A custom function that converts meters to miles.

@param {Number} meters The distance in meters.
@return {Number} The distance in miles.