avoiding division by zero when calculating attendance rate