Use === when looking for $SM.get returning undefined.
Fix other comparison warnings.