inout/input: trim strings before checking for empty string