Helper functions for MemoryInstruction