New helper function to check collision between Rectangles and Points