error handling for unknown format being passed to caster
added %B (bool or null) to caster