This issue is caused by the performance improvement done on 5.4.4 (and backported on 5.3.11).
the symptom is a NPE when flushing a persisted entity containing a ElementCollection with null as one of the elements in the list.
a test case has been attached
The NPE is also thrown when an automatic flush is triggered (when for example we call getResultList() on a native query).
upgrading to the latest 5.4.6 doesn't fix the issue not downgrading to 5.3.12 but downgrade to 5.4.3 fix the issue...