Does this have needed side-effects ?  If you just want the value returned, please move it inside the inner conditional, so we only compute it if we need it.