code: function(lonlat) {
          var valid = false;
          if (lonlat != null) {
              var maxExtent = this.getMaxExtent();
              var worldBounds = this.baseLayer.wrapDateLine && maxExtent;
              valid = maxExtent.containsLonLat(lonlat, {worldBounds: worldBounds});
          }
          return valid;
      }
docs: Method: isValidLonLat
  
  Parameters:
  lonlat - {<OpenLayers.LonLat>}
  
  Returns:
  {Boolean} Whether or not the lonlat passed in is non-null and within
  the maxExtent bounds