Except IndexError for blank input lines