main.js cleaning

removed parentheses from 'if( type( variable ) !== "undefined") )'
statements