Simplify condition for buffer string appending