adding javadoc for the null element handling