[FOLD] Refactor STObject and isMemoOkay