validates given IP address