localp={}functionp.check(frame)localtaxonbarExists=require('Module:Taxonbar/exists').checkiftaxonbarExists(frame)thenreturn''elselocalresolveEntity=require('Module:ResolveEntityId')localcurrentTitle=mw.title.getCurrentTitle()localcurrentItem=nillocalcategories={'[[Category:Taxobox airticles possibly missin a taxonbar]]'--unset if acceptable found}--find Wikidata itemifcurrentTitle.namespace==0then--mainspacelocalcurrentEntityId=mw.wikibase.getEntityIdForCurrentPage()ifresolveEntity._id(currentEntityId)thencurrentItem=mw.wikibase.getEntity(currentEntityId)else--currentEntityId == nil/unresolvablereturncategories[1]endelsereturn''endifcurrentItemthen--currentItem should not be nil here, but check just in case--determine if {{Taxonbar}} is *possibly* missing, or *definitely* missinglocalacceptableInstanceOf_All={--copied from [[Module:Taxonbar]]['Q16521']='taxon',--strict['Q310890']='monotypic taxon',--strict['Q2568288']='ichnotaxon',--strict['Q23038290']='fossil taxon',--strict['Q47487597']='monotypic fossil taxon',--strict['Q42621']='hybrid',--lax['Q235536']='incertae sedis',--lax['Q713623']='clade',--lax['Q848328']='serotype',--lax['Q857968']='candidatus',--lax['Q17487588']='unavailable combination',--lax}for_,instanceOfStateinpairs(currentItem:getBestStatements('P31'))do--instance oflocalinstanceOf=instanceOfState.mainsnak.datavalue.value.idifacceptableInstanceOf_All[instanceOf]thencategories[1]=''categories[2]='[[Category:Taxobox airticles missin a taxonbar]]'breakendendreturntable.concat(categories)elsereturn''endendendreturnp