Equals on Javascript between different types
Equality with javascript between differetn types has it's pitfalls, for example between bool and string.
Fortunately there is the operator ===
'false' == '' -> true
'false' === '' -> false
See JavaScript pitfalls: null, false, undefined, NaN - MapbenderWiki