title: Null checking in Javascript (with ternary operator)
body: <p>want to check null values. <code>any()</code> method returns <code>null</code> or array of matched result (actually there's a <code>match()</code> method inside which is returned). </p>
  
  <pre><code>$scope.isMobileBrowser = !isMobile.any() ? false : true;
  </code></pre>
  
  <p>If <code>any()</code> method returns null I want <code>false</code> to be assigned to <code>$scope.isMobileBrowser</code> variable, otherwise <code>true</code>. will the over mentioned snippet fail in any probable case? Is there any other more efficient workaround?</p>
  
  <p>for more details of <code>isMobile</code> object:</p>
  
  <pre><code>var isMobile = {
      Android: function() {
          return navigator.userAgent.match(/Android/i);
      },
      BlackBerry: function() {
          return navigator.userAgent.match(/BlackBerry/i);
      },
      iOS: function() {
          return navigator.userAgent.match(/iPhone|iPad|iPod/i);
      },
      Opera: function() {
          return navigator.userAgent.match(/Opera Mini/i);
      },
      Windows: function() {
          return navigator.userAgent.match(/IEMobile/i);
      },
      any: function() {
          return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
      }
  };
  </code></pre>