[Bug Fix] Possible NPE fix in custom variable replacer.