add safe_printf; check_type_is_class;

Signed-off-by: lizhenghn123 <lizhenghn@gmail.com>