Add check for valid IPv4 address