Verifying whether the stack is empty