#1603 remove unnecessary if check. fixed some spacing issues webstorm's default is 4 spaces and jshint uses 2 my bad.