added ability to handle case when StoreIntToMem(~)'s In_ptr is NULL
added a missing include