Added check if case and case_id exist in xml.