Make sure the PartialFunctions are only applied if defined for the input