Refactor another len() call