Add nil check when matching repo uris

This handles the case where the project's git repo is on the same local filesystem such as `/git/foo.git`.