It's ok to remove spaces but why do you want to use non-strict comparation for that? eqeqeq works faster and typeof always returns string