Fixing conditional syntax to pass jshint