add support for message_check_safe hook