Do assignment before "if" to avoid repeat evaluation.