corrected undefined identity check to conform to code style guide