Checks that the output or input type is used in the correct position.