[CommandHandler] Fix potential NULL pointer dereference

Also re-ordered the code a bit. There is no point trying to
figure out the statusType when we cannot and the NULL check at the end is
not needed anymore.

Fixes: CID#58940

Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
Merge pull request #12 from philippedeswert/coverity

[CommandHandler] Fix potential NULL pointer dereference