Hmm, good point. I think doing this can be made to depend on a having an inf value, so that should make most cases reasonable efficient.