Updated java doc and add a nullable to reflect javadoc