you could design the mailbox to accept all messages, how the object handles those messages is a separate concern, you could use something like multiple dispatch to then decide which method on the object gets the message.
Gleam is a statically typed language on the BEAM, early implementations the messages between processes were not typed, Im not sure if that still the case.
Pony is a OO language thats based on the Actor model that has a strong static type system, where typed message passing is central to the language.