The only thing I would change is to factor the error case into another method, like:
```
// Check for fully-qualified type name collisions, may throw IllegalStateException
checkForCollisions(typeFqName, protofiles);
types.add(typeFqName);
```