Added check for empty input.

If input is empty, the user will be asked for new input.