Checking undefined_p before using the vr