list_remove now does nothing for a null element