simplified isType validtor logic