dog: fix confusing code for checking arguments

This command will cause a command line core dump:

dog vdi object location -i 0

As you can see, vdi name is needed as an argument but the above
command don't specify.

The patch fix the bug and others caused by the same reason.

Signed-off-by: Ruoyu <liangry@ucweb.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>