profiles: fix null pointers in various cases

 * Fix NPE when no apps are selected
 * Fix NPE when service hasn't been started yet

Signed-off-by: Blechd0se <alex.christ@hotmail.de>