Added check for the program input