fix google compiler warnings

```
Input_0:8: WARNING - Suspicious code. The result of the 'not' operator is not being used.
!function(factory) {
^
Input_0:65: WARNING - If this if/for/while really shouldnt have a body, use {}
        while (
        ^
```