[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>
Fixed! No merge rights so you will have to do the merge