Making Changes to Mem_Alloc

added more code for Null Case