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

@yamunaBQ  validate collection is null and check the collection type