Function checkStruct