Added support for simple types recognized by the get_debug_type()
function.
Note
Laravel 11 added the ensure()
collection method that verifies that all elements of a collection are of a given type or list of types. However, this verification does not prevent items of different types to be added at a later time.