Check if database should be initialized.