The issue is caused because you aren't initialising your story varaibles before you reference then within the conditional expresson you are passing to your (if:) macros, and Harlowe automatically initialises such variables to a default value of zero (0).
eg. Lets assume you have a Passage containing the following two conditional expressions, the first of which is testing to see if $seenKnife is equal to Boolean true...
<!-- You haven't assign $seenKnife a default value yet. -->
(if: $seenKnife)[show an error about zero not being a Boolean]
<!-- Harlowe assigned zero (0) to $seenKnife in previous conditional expression. -->
(if: $seenKnife is 0)[The variable is zero now]
...and if you haven't previously assigned $seenKnife a value then Harlowe will automactically initialise the variable to zero (0) before testing it's value. This is why the second conditional expression will evaulate to true, because $seenKnife now does contain a value of zero.
It is a good idea to always initialise your story variables sometime before you first reference them in either a conditional expression or before you output their current value to the page.
The best place to do such initialisation is within your project's startup tagged special passage like so...
(set: $seenKnife to false)
Now if we visit the previous Passage with the conditional expressions again...
(note: I have added a third to show how to test for Boolean false)
<!-- You have initialised $seenKnife to a default value. -->
(if: $seenKnife)[nothing displayed because value is false]
(if: $seenKnife is 0)[nothing displayed because value is false]
(if: not $seenKnife)[displayed because value is false]
... the will notice that the error message has gone away.