fixed check type if target is type def