check if vnn is a valid pointer before dereferencing it