Helper function to determine whether a pipe callback exists or not