I saw implementation of HibernatePatienDAO::getPatientIdentifiers. And there is assumption that parameter with type collection is not null ( directly invoke size() method on collection).