Handle nil violations when checking JavaScript style

This came up a few times in production.