or just change callDeprecatedFunction so that is doesn't try to apply the function if it is null.