modified Mystack.class pop method to make it return a value of generics type T rather than void in previous design;and additionally, if the stack is empty, return null.