Sigsegv fix

I think here should be this check. Im working with cocos2dx on linux and i dont't have android libs loaded so i would like that code don't crash :)

I return the same values as when retValue is NULL