clean crash

if you pass send the message to setEasingFunction:forKeyPath: , and the
keyPath is nil, it will lead to crash.