import re


def string_is_q_item(text):
    """Check if a string looks like a WD ID."""
    pattern = re.compile("^Q[0-9]+$", re.I)
    try:
        m = pattern.match(text)
    except TypeError:
        return False
    if m:
        return True
    else:
        return False