return nothing if buffer is all whitespace