When you use Debug.Log you have to return an animationClip or return null. The argument exception breaks the code's execution but debug.log only leaves a message in the console.
If you add return null after the debug line then you should be good.
When a function has an AnimationClip return type, it must always either return an animation clip, return null.