fixed CAT-932 added try-catch for NullPointer
Merge pull request #1045 from Catrobat/cat-932

[CAT-932] added try-catch for NullPointer
JRA-932