title: Call "Optional#isPresent()" before accessing the value
body: <p>As i am getting Call "Optional#isPresent()" before accessing the value in Sonar issues for the below Code Snippet , please help me to resolve this issue.</p>
  
  <pre><code>List &lt;Department&gt; deptList =new ArrayList();
  
  List&lt;Student&gt; studList=new ArrayList();
  
  Department dept= studList.stream().min(comparator.comparing(Department::getDepartmentNo)).get();
  </code></pre>
  
  <p><strong>Call "Optional#isPresent()" before accessing the value</strong>.</p>