input: Write a function to create a basic blockchain system in Python. The function should include a `Block` class to represent each block in the blockchain, with attributes for index, timestamp, data, and previous hash, and a `Blockchain` class to manage the chain, including methods to add a new block and retrieve the entire chain in JSON format.
  assert is_valid_block('Example Data') == True
  assert is_valid_block('Another Example') == True
  assert is_valid_block('Invalid Data') == False
  assert is_valid_block('') == True
  assert is_valid_block(None) == False
output: 
  class Block:
      def __init__(self, index, timestamp, data, previous_hash):
          self.index = index
          self.timestamp = timestamp
          self.data = data
          self.previous_hash = previous_hash
          self.hash = self.calculate_hash()
  
      def calculate_hash(self):
          return hashlib.sha256(f"{self.index}{self.timestamp}{self.data}{self.previous_hash}".encode()).hexdigest()
  
  class Blockchain:
      def __init__(self):
          self.chain = [self.create_genesis_block()]
  
      def create_genesis_block(self):
          return Block(0, "01/01/2023", "Genesis Block", "0")
  
      def get_latest_block(self):
          return self.chain[-1]
  
      def add_block(self, new_block):
          new_block.previous_hash = self.get_latest_block().hash
          new_block.hash = new_block.calculate_hash()
          self.chain.append(new_block)
  
      def get_chain_json(self):
          return json.dumps([block.__dict__ for block in self.chain], default=str)
  