Fix so that valid_format? returns a boolean.