proper db check