Simplify and update pom.xml
PLT-497 Better handling of null

Fix Javadoc
Use Optional