handles error of all whitespace string