remove unnecessary comparisons with undefined
Merge pull request #423 from caseyjhol/master

remove unnecessary comparisons with undefined