shouldnt this be `null === $messages`? If we are expecting an array, or null? or a `!is_array($messages)`? `!$messages` is ambiguous