compare dynamic object with data type