This validation should be done in ```Interface._validate_inputs_outputs``` (see the docstring there for details).