add genCheck for pointers