[Java]: Fix for handling optionality and null values in enum types by propagating to pseudo super type for encoding. Fix for issue #77.