Fixed NRE's when passing 'null' for PersonIds or AnonymousPersons