Change conditional that checks if val exists

If val was the boolean false, it would skip this step. This is why keys could not have the value false
Add more detailed tests for set and get