Add checkState() to Database