pop method Null safety

T pop()

Implementation

T pop() {
  final T lastElement = _stack.last;
  _stack.removeLast();
  return lastElement;
}