adding type check to lookup-type