Instead of defining a dummy updateRecord function above, you could just leave it undefined.  Then, if the user did not specify one, you can just return here:

  if (!media.updateRecord) return;