Filter empty strings from input stream