Role of hyperons in black hole formation