Extracted out the collision checks.