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.

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 == '/'