Add constraint check for port type and remove the test for parameter type