Try this condition instead:
if (string.IsNullOrWhiteSpace(MaterialTextBox.Text)) {
// Message box
}
This will take care of some strings that only contain whitespace characters and you won't have to deal with string equality which can sometimes be tricky