Reducing 2 conditions into a single closure.