tiny nitpick but `null != obj[key]` would be good here, might as well include null as well