Java 8 introduced the Optional class and we should add support for that.
The implementation for that should be done through a attribute converter API that should be designed as part of this implementation. For now, it should be good enough to support conversion of singular attributes, but it might be interesting to also support plural attributes to be able to make use of custom collection types.