Add safe handling of environment variable.
Update to make reaction keys case insensitive.