check for vtable before referencing it