Fix FromBoolean and add tests