added hasNamedEntities method