Using regular expression we can check the Guid is valid or not
Regular Expression: ^[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}$
C# Code
Regex isGuid = new Regex(RegExFormats.GuIDPattern, RegexOptions.IgnoreCase);
bool match= isGuid.IsMatch(retValue)
If the given Guid (retValue) is match it will return true, otherwise false.