[INTERNAL] fixed some potential NPE

Change-Id: Ifccb8400d59aa2d3a6ad45e0e422b5400f4234f3
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/1730
Tested-by: Jenkins-Eclipse QA
Tested-by: Jenkins CI
Reviewed-by: Franz Zieris <zieris@inf.fu-berlin.de>