check for null before querying replays

fixes #5431