add: minor safety enhancement to data parsers.

Signed-off-by: liuyanghejerry <liuyanghejerry@126.com>