fixed null pointer error for imagemagick transformer.