Check for effect == null before using.