client: implement command check functionality

Implement the check functionality of commands.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
Merge pull request #1 from tamlok/master

client: implement command check functionality