For certain Wikidata items, it's not possible to access the entities and properties in the client via the parser function or with Lua. It says "entity not found".
Checking in the wb_entity_per_page table, these items are missing. A total of ~40,000 entities are missing from the table and thus would have the same issue. wb_entity_per_page is used in the lookup query, with a db join.