Improve error message when the codec registry inspects a collection with a null element

Description

yields a cryptic NPE:

We should have a more explicit error message.

This was reported in the context of the query builder, but I think the check should go in the registry directly.

Environment

None

Pull Requests

None

Status

Assignee

Olivier Michallat

Reporter

Olivier Michallat

Labels

PM Priority

None

Reproduced in

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

Doc Impact

None

Reviewer

None

Size

None

Fix versions

Priority

Minor
Configure