def get_env(key)
      env = ENV[key.upcase]
      return nil if env.nil?

      # Try to convert it into a boolean value.
      return true if env.casecmp("true").zero?
      return false if env.casecmp("false").zero?

      # Try to convert it into an integer. Otherwise just keep the string.
      begin
        Integer(env)
      rescue ArgumentError
        env
      end
    end
def get_env(key)
      env = ENV[key.upcase]
      return nil if env.nil?

      # Try to convert it into a boolean value.
      return true if env.casecmp("true").zero?
      return false if env.casecmp("false").zero?

      # Try to convert it into an integer. Otherwise just keep the string.
      begin
        Integer(env)
      rescue ArgumentError
        env
      end
    end
Get the typed value of the specified environment variable. If it doesn't
 exist, it will return nil. Otherwise, it will try to cast the fetched
 value into the proper type and return it.