add the toBeTypeOrUndefined method to judge an optional key in API, and ...

add the toBeTypeOrUndefined method to judge an optional key in API, to judge an optional key which can or can not be in there in json response