[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>
Nitpick, a space after return or brackets in the statement would make the code more readable IMO.