checking if something is in front before walking