How to find posts that are missing translation? (wpml)

To whom it may concern: finally I found a way – and it turns out to be rather simple: there is a wpml function or actually a filter that checks whether a post or page has a translation or not:

wpml_element_has_translations

https://wpml.org/wpml-hook/wpml_element_has_translations/

It returns TRUE if a translation exists and FALSE if there is no translation. I used the following to check for posts inside the loop where $the_id is the ID of the post I want to check:

$is_translated = apply_filters( 'wpml_element_has_translations', NULL, $the_id, 'post' );