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');
    }
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');
    }
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' ) ; }
Validate and return acceptable URL value.

@param  string|null $url
@return string|null
Validate and return acceptable URL value .