Check repository to see if resource exists. A bit of a spike, so needs better testing.