add the toBeTypeOrUndefined method to judge an optional key in API, and modify the _jsonContains & _jsonContainsType method