Prevent logging empty strings