extract overlaps and collect them together, and use jQuery's built-in method for type checking