private function getValidExternalUrlValue($url)
    {
        if ($url === null || (is_string($url) && filter_var($url, FILTER_VALIDATE_URL))) {
            return $url;
        }

        throw new InvalidArgumentException('URL is not valid');
    }