Fix null check in git commit.

@devoncarew TBR

fixes #1974