/**
  * Sets the distance matrix request language.
  *
  * @param string $language The distance matrix request language.
  *
  * @throws \Ivory\GoogleMap\Exception\DistanceMatrixException If the language is not valid.
  */
 public function setLanguage($language = null)
 {
     if ((!is_string($language) || strlen($language) !== 2 && strlen($language) !== 5) && $language !== null) {
         throw DistanceMatrixException::invalidDistanceMatrixRequestLanguage();
     }
     $this->language = $language;
 }