checkObject accepts empty array

closes #2773
- added error class
- changed check to allow empty arrays

@erisds could you please verify my bug report before merging to make sure it isn't an issue with my environment? Thank you!