[hibernate-issues] [JIRA] (HV-1652) Fix a few theoretical null pointer dereference issues