if .properties dont exist shouldn't .properties.periods be undefined? and if it is, i do check that

if .properties dont exist shouldn't .properties.periods be undefined?
and if it is, i do check that
export function exists<T>(data: T|null|undefined): data is T {
  if (
      (data === null) ||
      (data === undefined)
  ) return false;
  return true;
}
Was this page helpful?