I am just wondering why the Java 7 switch statement does not support a null case and instead throws NullPointerException? See the comm
switch
null
NullPointerException
In general null is nasty to handle; maybe a better language can live without null.
Your problem might be solved by
switch(month==null?"":month) { ... //case "": default: monthNumber = 0; }