creating helper function for checking datastore db