Adding a type check for the values passed to Environment.set.
Merge pull request #10 from Wilfred/fix_equality

Fixing some equality bugs.
WIP. [skip ci]