Fix confusing use of ! and = in JavaScript

Fix code that makes JSHint issue the confusing use of ! and
assignment used as condition warnings.

Change-Id: Ifa0cdde7f9ce1ca0f4e806dc18d93eb3099914c8
Implements: blueprint js-coding-style-checks
Merge "Fix confusing use of ! and = in JavaScript"