Added variable casting to FormatterBase.