checkObject accepts empty array

closes #2773
- added error class
- changed check to allow empty arrays