Validate IP address