How to prevent user to input nothing in bash script

view story

http://stackoverflow.com – I have a program that will take user input string and create output files accordingly, for example, "./bashexample2 J40087" this will create output files for all the files in the folder that contain the string J40087. One problem is that if the user does not input anything in the input string it will generate output files for every file inside the containing folder. Is there a way to prevent user to input nothing in the input string? Or maybe spit out some sort of warning saying " please input an input string". #Please follow the following example as input: xl-irv-05{kmoslehp}312: ./bashex (HowTos)