returns nil if the passed image is nil