Return statement in IEnumerator Unity C#

Hi,

I have problem in IEunmerator function Unity C#.

In the following script I want to return the function if the the string is null.
But, using IEnumerator will not allow me to put return statement inside of it.

IEnumerator DownloadData ()
{
        WWW download = new WWW (URL, form);
		yield return download;
		
		XMLValue.PHPValues= this.gameObject;
		if (!string.IsNullOrEmpty(download.error))
		{
			ErrorPopup("Please check your internet connection.");
			return;
		}
 }

If i use

yield return 0;
(or)
yield return null;

will execute the lines after this line. But,
How could i return control from the function??

Use yield break;

IEnumerator DownloadData ()
{
       WWW download = new WWW (URL, form);
       yield return download;
 
       XMLValue.PHPValues= this.gameObject;
       if (!string.IsNullOrEmpty(download.error))
       {
         ErrorPopup("Please check your internet connection.");
         yield break;
       }
}