The current way of doing this would also traverse the prototype chain, and therefore yield false positive results for keys like "toString".