Added null pointer check to imageView and progressWheel.