check if the variables are of defined types, check if a class extends of a defined type