Fixed CORE-2106 for while edit an classpage itemType field missing

Fixed validate collection is null .check the collection type and else if for classtype