next_greater_element: remove useless test