More robust entity checking