prefer hasOwnProperty instead of in (http://stackoverflow.com/questions/13632999/if-key-in-object-or-ifobject-hasownpropertykey)