java implementation: added nulls support, data types adapter