fix crash in R some implementations on R_ReleaseObject(NULL)