check types in relations