async def check_name_and_abbreviation(db, ref_id, name=None, abbreviation=None):
    """
    Check is a otu name and abbreviation are already in use in the reference identified by `ref_id`. Returns a message
    if the ``name`` or ``abbreviation`` are already in use. Returns ``False`` if they are not in use.

    :param db: the application database client
    :type db: :class:`~motor.motor_asyncio.AsyncIOMotorClient`

    :param ref_id: the id of the reference to check in
    :type ref_id: str

    :param name: a otu name
    :type name: str

    :param abbreviation: a otu abbreviation
    :type abbreviation: str

    """
    name_count = 0

    if name:
        name_count = await db.otus.count({
            "lower_name": name.lower(),
            "reference.id": ref_id
        })

    abbr_count = 0

    if abbreviation:
        abbr_count = await db.otus.count({
            "abbreviation": abbreviation,
            "reference.id": ref_id
        })

    unique_name = not name or not name_count
    unique_abbreviation = not abbreviation or not abbr_count

    if not unique_name and not unique_abbreviation:
        return "Name and abbreviation already exist"

    if not unique_name:
        return "Name already exists"

    if not unique_abbreviation:
        return "Abbreviation already exists"

    return False