Added support for write_bool to properly handle booleans received as strings.