simplifed check record exists logic