Updated typeFromStr heuristic.