Handle cleanly the case when pull["head"]["repo"] returns None.

This may be linked to the user sending a PR from his master branch.
For example, see https://github.com/sympy/sympy/pull/1793