Object and type utilities, with function wrapper for typed events