Refactor boolean conversion into separate function and add tests for every boolean