<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def isValidUnit(self, w):
 """Checks if a string represents a valid quantities unit. Args: w (str):
 A string to be tested against the set of valid quantities units. Returns: True if the string can be used as a unit in the quantities module. """

        bad = set(['point', 'a'])
        if w in bad:
            return False

        try:
            pq.Quantity(0.0, w)
            return True
        except:
            return w == '/'