Check whether net.ParseIP returned nil or not

This is fix of #8102

Signed-off-by: Oh Jinkyun <tintypemolly@gmail.com>
Could you pls move this to `integration-cli/docker_cli_run_test.go`? It is preferred way to write such tests. You need just to pass wrong arguments and check that output is about wrong hostname. Also might be useful to have test with right hostname if there is no already.