Why not `if (input.hasOwnProperty(key))` ?