yes, it is done in the outputSchema() function.

            List<Schema.FieldSchema> fieldSchemaList = tupleSchema.getFields();
            
            if(fieldSchemaList == null || fieldSchemaList.size() != 2) {
                throw new RuntimeException("The field schema of the input tuple is null or its size is not 2");
            }