from datetime import date, datetime
from decimal import Decimal
from uuid import UUID


INDEXABLE_TYPES = set(( bool, str, int, float, bytes, datetime, date, UUID, Decimal ))


def dereference(data, keys):
  value = data
  for key in keys:
    if type(value) is dict:
      value = value.get(key)
    else:
      return None
  return value
