sg.schema bug fixes

- fixes an issue with an invalid property set for an array type
- fixes an issue when an array is valid but the schema would return an array with an undefined object
- fixes an issue when an object's keys were not parsed as per the schema