Will be better to throw an error, if value is not a boolean.