Prevent crash when return value from tested function is undefined.