code: function(input, remoteData)
    {
      var db = this;
      var keyHandler = db.keyHandler;
      var hasRemote = db.remoteLoaded || !db.hasLoad( Load.All );
  
      if ( !isValue( input ) )
      {
        return hasRemote ? null : false;
      }
  
      if ( isRekord( input ) )
      {
        input = new input();
      }
      if ( isFunction( input ) )
      {
        input = input();
      }
  
      var key = keyHandler.buildKeyFromInput( input );
  
      if ( input instanceof db.Model )
      {
        return input;
      }
      else if ( key in db.all )
      {
        var model = db.all[ key ];
  
        if ( isObject( input ) )
        {
          keyHandler.buildKeyFromRelations( input );
  
          if ( remoteData )
          {
            db.putRemoteData( input, key, model );
          }
          else
          {
            model.$set( input );
          }
        }
  
        return model;
      }
      else if ( isObject( input ) )
      {
        keyHandler.buildKeyFromRelations( input );
  
        if ( remoteData )
        {
          return db.putRemoteData( input );
        }
        else
        {
          return db.instantiate( db.decode( input ) );
        }
      }
      else if ( hasRemote )
      {
        return null;
      }
  
      return false;
    }
docs: Parses the model from the given input  Returns false if the input doesn't resolve to a model at the moment Returns null if the input doesn't resolve to a model and all models have been remotely loaded  parseModel( Rekord ) parseModel( Rekord.Model ) parseModel( 'uuid' ) parseModel( ['uuid'] ) parseModel( modelInstance ) parseModel( {name:'new model'} ) parseModel( {id:4, name:'new or existing model'} )