add nullable return values for shift and pop