Adding ptype verification

Signed-off-by: Cristian Maureira-Fredes <cmaurei@aei.mpg.de>