private async void checkDatabaseIfUsernameExistsAndAddItIfItDoesnt() { String result = await dbm.CheckUserExists(displayNameTextBox.Text); if (result == null) { //displayName doesn't exist. add it to the database dbm.CreateNewUser(displayNameTextBox.Text, emailTextBox.Text, schoolComboBox.Text, passwordTextBox.Text); } else { //displayName does exist and result is suggested name MessageBox.Show("Display Name already exists, try: " + result, "Display Name already exists", MessageBoxButtons.OK, MessageBoxIcon.Error); } }