Use hasOwnProperty() rather than testing defined-ness