public function isValid()
  {
    if (!is_string($this->accessToken))
    {
      $msg = 'Provided access token is invalid as it is not a string';
      throw new Errors\ConfigurationError($msg);
    }

    if (preg_match('/\s/', $this->accessToken))
    {
      $msg = 'Provided access token is invalid '
        . 'as it contains disallowed characters. '
        . 'Please double-check your access token.';
      throw new Errors\ConfigurationError($msg);
    }

    if (strlen($this->accessToken) != 64)
    {
      $msg = 'Provided access token is invalid '
        . 'as it contains disallowed characters. '
        . 'Please double-check your access token.';
      throw new Errors\ConfigurationError($msg);
    }

    if (!is_string($this->baseUrl) || !preg_match(Configuration::URL_REGEXP, $this->baseUrl))
    {
      $msg = 'Provided base url is invalid '
        . 'as it is not a valid URI. '
        . 'Please make sure it includes the schema part, both http and https are accepted, '
        . 'and the hierarchical part.';
      throw new Errors\ConfigurationError($msg);
    }

    return true;
  }