public function setTravelMode($travelMode = null)
    {
        if (!in_array($travelMode, TravelMode::getTravelModes()) && ($travelMode !== null)) {
            throw DirectionsException::invalidDirectionsRequestTravelMode();
        }

        $this->travelMode = $travelMode;
    }