[builder] Remove unnecessary null check
[builder] Remove unnecessary null check

The method getCommitByIndex throws when there is no commit. It never
returned null and callers would eventually throw when this is was null.

Change-Id: Ia6b5bee9c6bf2332302114ba89423e9e2898c766
Reviewed-on: https://dart-review.googlesource.com/c/dart_ci/+/255999
Commit-Queue: Alexander Thomas <29642742b6693024c89de8232f2e2542cf7eedf7@google.com>
Reviewed-by: William Hesse <a821cddceae7dc400f272e3cb1a72f400f9fed6d@google.com>

dart-lang/dart_ci,dart-lang/dart_ci,dart-lang/dart_ci,dart-lang/dart_ci