Fixes #8234, check the existence of project to avoid the panic Signed-off-by: Wenkai Yin <yinw@vmware.com>