Turn on/shut off a component depending on situation

In the second pipeline, there might be times that no external file will need to be read into the protocol. However, if no file is specified in the reader then the protocol will run into an error. Is there a way that I can shut the reader or the whole pipeline 2 off when no filename is specified for that reader?