Got rid of NPE by adjusting Message constructor