How to Check for Overlapping Intervals