Division by zero check when calculating average score