I think the code could look better if we avoid that return and do the following:

``js
if(photo) {
  try {
    img.dataset.src = window.URL.createObjectURL(photo);
  }
 catch 
}
``