Ensure empty objects are validated correctly

Also added another test for when the object has no `widgets` key
Merge branch 'domharrington-master'
0.5.0