Check if JavaScript input is empty
One edge case you're missing is how to handle null. isEmpty(null) will  fail because Object.getOwnPropertyNames(null) will throw TypeError: can't convert null to object.

Also be aware that isEmpty(NaN) will return false, which may or may not be what you want.