restapi: Avoid NPE with empty app list

Currently we don't check the list of applications installed in a VM to
make sure that the application names aren't empty. This patch fixes
that in order to prevent NPEs.

Change-Id: Ieed7a5b90732f510973bedd7306d236ade4b2b3a
Bug-Url: https://bugzilla.redhat.com/1092380
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>