fix string conversion error with None type