Ensure callback is not undefined before trying to access properties