is this name correct, this looks more like you are validating that the image is one of the allowed types