A comparison principle for minimizers