SPARK-3840 - Fixed template substitution when value is None (not found on environment)