Add transform_if function to algorithm component