downcase object types when constructing output hash to prevent nil error...

...s on case mistmatches in data

tthis will fix the apo "nil" error and probably other future cases