On getClassImage null is only returned when creating the image fails.