You never initialized your masterDict
:
public static Dictionary<String, msg> masterDict { get; set; }
This doesn't set it to anything. It will be equal to null until you set it:
masterDict = new Dictionary<String, msg>();
You probably want to do it in your class constructor.