Ported DbExists test