Fix null check in git commit.
Merge pull request #1988 from dart-lang/fix_commit_null

Fix null check in git commit.