fix assignment of optionals, adds a unit test
Merge pull request #33 from mapbox/fix_assignment_operator

fix assignment of optionals, adds a unit test