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