Checks collision with walls