handle nil for string value.