Always remember that the user might actually enter an empty line. Better check for this scenario in your code too.