pub fn validate_ip<'a, T>(domain: T) -> Result<IpAddr, Error>where T: Into<Cow<'a, str>>,
Checks if a given string is a valid ip address or not