HHH-8697 and HHH-9320: Storing and retrieving nulls converted with AttributeConverter

This PR fixes both [HHH-697](https://hibernate.atlassian.net/browse/HHH-8697) and [HHH-9320](https://hibernate.atlassian.net/browse/HHH-9320) as they are closely related.