How can I have my enemey character check for holes in the ground?

Just do a line trace down slightly in front of the enemy character. The distance of the lincast would be the maximum distance it can fall down. If it does not hit anything, turn it around.