Fix NPE in case of receiving empty roles array