Function normalizeOptionalString