Check whether net.ParseIP returned nil or not

This is fix of #8102

Signed-off-by: Oh Jinkyun <tintypemolly@gmail.com>
Merge pull request #8125 from somaopensource/8102-fix

Check whether net.ParseIP returned nil or not