Return a boolean if the value is a valid netmask.

def validate(self, value):
        """Return a boolean if the value is a valid netmask."""
        try:
            self._choice = IPAddress(value)
        except (ValueError, AddrFormatError):
            self.error_message = '%s is not a valid IP address.' % value
            return False
        if self._choice.is_netmask():
            return True
        else:
            self.error_message = '%s is not a valid IP netmask.' % value
            return False