It seems that in the past, the data.path_resolve() would raise a ValueError when the custom property's value was None. This no longer seems to be the case, it actually returns None now, so replaced the try/except with a None check.
Test file:
(Will say successfully inserted 10 keyframes but throw error in console when trying to Insert Keyframe)