Making the type and null check for os_distro optional according to import image_type