export function is(element: { businessObject: any }, type: string) {
  const bo = getBusinessObject(element);

  return bo && typeof bo.$instanceOf === 'function' && bo.$instanceOf(type);
}

export function getBusinessObject(element: { businessObject: any }) {
  return (element && element.businessObject) || element;
}
