I might validate that the string wasn't empty or looked like a hostname / ip, but that isn't a huge concern, mostly bonus points.