extend type check
add some prints