Please inline the check. Also, `name` is declared twice & `isMatch` isn't used.