clean crash

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