Fix issue with empty check against trimmed data.