Check for listen data struct validity

Fixes #18360