In components, it might happen that the add_input or add_output fails because of a null pointer exception or because of unsupported message types, or something else. The first thing that add_input and add_output do is declaring a topic parameter. It might be nice to undeclare that topic parameter if adding the signal fails