* Better memory allocation: Check if the memory was allocated.