Fix wrong value type passed to format string
Make error strings lowercase