Fixed null pointer issue in getclassItem API