'Validate boolean.
Returns:
A valid value.
Raises:
BadValueError if property is not instance of \'bool\'.'

def validate(self, value):

    value = super(BooleanProperty, self).validate(value)
    if ((value is not None) and (not isinstance(value, bool))):
        raise BadValueError(('Property    %s    must    be    a    bool' % self.name))
    return value
