Property of object not set if val === undefined