In the MNIST dataset, you have 10 defined classes, one for each digit. But you don't have a "not a digit" class. It seems that most image classification datasets are the same. But in a business setting, for a production model, you could certainly get invalid images that don't correspond to any of the defined classes.
So let's say you were to create a handwritten digit image classifying model to be used in a real-world project. If you don't have a "not a digit" class, then if somebody submits a picture of the letter "M", then it will incorrectly be classified as one of the 10 digit classes.
So, in this example, should you define a "not a digit" class and train the model on a set of images that the model may be expected to receive that have nothing to do with handwritten digits such that invalid images are correctly classified as "not a digit"?