avoid visit property of undefined