fix TaskInfo->Json method to work with null values.