Fixed bug with isEmptyObject

The function did not throw an error when an array was passed as the
value.  This was incorrect behavior for the function.

The function now throws an error when an array is given as an
argument.
Adding more unit tests