Validate getEntity() is valid before feeding it elsewhere

Closes #3593345.

Merge request reports

Loading