some Nullpointer Fixes

can you plz add this to your plugin? we got many nullpointer exceptions.