check for empty input in scanLeft