if (!d) {
  return; // let's avoid unneeded indentation
}