checks that allocated structs are defined