Fix possible NPE if object not loaded.

Fix possible NPE when generating projected image
To test

 * Import a lsm image with multiple z
 * Project the image.
 * A thumbnail should be generated.
really want these log messages at info level?