Checks if database exists