Update TryTo to use PartialFunctions