This is exactly the kind of issue that go away with elm.
http://blog.jenkster.com/2016/06/how-elm-slays-a-ui-antipatt...
http://blog.jenkster.com/2016/06/how-elm-slays-a-ui-antipatt...
I always use `null` to differentiate between an empty list or string and nothing.
I like when I have a type system that ensures I check for null etc. But I only work on very small projects so this works well in js for me as well.