Conditionally add action.