`matches && matches.length > 2` might be better for this initial check.