Add an exists method as an optimisation.