Allows to centralize logic which is needed to check which cost functor to use for the specific intrinsics.