Parser assignment

`last !=null`  may be OK for dart, but I think in JS we should be using `!==` and we should be checking for undefined as well. The logic does not seem right to me.