Set to empty function instead of undefined (#10960)

It seems that the presence of the function is checked once while it is still set and it will be later called without additional checks that it is still set.

Change-Id: Ie985d9047f4d2ca469f1a406ba40bca0ac3a59e9