judge a string is IP or not