MDL-38149 core_grade: added a guard for when there are no old grades