code: def data_it(db_data, user_type):
          
          data_type = {
              'array': (list),
              # 'binary': (string_types),
              # 'bytes': (string_types),
              'dict': (dict),
              'entity': (dict),
              'list': (list),
              'str': (string_types),
              'string': (string_types),
          }
          # user_type_tuple = tuple([data_type[t] for t in user_types])
          # if isinstance(db_data, user_type_tuple):
          if user_type is None:
              if db_data is None:
                  return True
          elif user_type.lower() in ['null', 'none']:
              if db_data is None:
                  return True
          elif user_type.lower() in 'binary':
              # this test is not 100%, but should be good enough
              try:
                  base64.b64decode(db_data)
                  return True
              except Exception:
                  return False
          elif data_type.get(user_type.lower()) is not None:
              if isinstance(db_data, data_type.get(user_type.lower())):
                  return True
          return False
docs: Validate data is type.
  
          Args:
              db_data (dict|str|list): The data store in Redis.
              user_data (str): The user provided data.
  
          Returns:
              bool: True if the data passed validation.