added option to ignore keys
considering empty objects of type different than 'object' as different