title: Check instanceof in stream
body: <p>I have the following expression:</p>
  
  <pre><code>scheduleIntervalContainers.stream()
          .filter(sic -&gt; ((ScheduleIntervalContainer) sic).getStartTime() != ((ScheduleIntervalContainer)sic).getEndTime())
          .collect(Collectors.toList());
  </code></pre>
  
  <p>...where <code>scheduleIntervalContainers</code> has element type <code>ScheduleContainer</code>:</p>
  
  <pre><code>final List&lt;ScheduleContainer&gt; scheduleIntervalContainers
  </code></pre>
  
  <p>Is it possible to check the type before the filter?</p>