check if there is an object in the way