optimize hasOwnProperty calls
add tests for objects.isEmpty