[PATCH 01/10] ifstats(): optimize: move some checks away from the hot path