add additional type check