Callback also needs a check on undefined