added try catch for NullPointer
Merge pull request #1044 from Catrobat/cat-1089

[CAT-1089] added try catch for NullPointer
JRA-1089 #fixed