Added type checking for assignments re issue #153