Assert if format is not a function or string

closes #31