check NULL if ec is valid
check NULL if ec is valid

Change-Id: Iccce55b3fa9178b055129c1ddea8fc5cce34f738

tizenorg/platform.upstream.enlightenment,tizenorg/platform.upstream.enlightenment,tizenorg/platform.upstream.enlightenment