Bugfix AGM_converter

using toLower on type Object caused an error.