JSLint and remove needless if condition