use check for struct validation