To check whether given ip address is correct or not