Added null check on trash env var. thanks ccc servers.