[bug #4297] The strlen mh-format function can crash if 'str' is null.