object: make git_object_lookup() return GIT_ENOTFOUND when searching for an existing object by specifying an incorrect type