Run a block depending on a condition