removing unnecessary null protection from addEntities method