adding docs and test to ensure that an if check using booleans uses type checking