More argument checks in git2r_commit C functions