def parse_params_bool(params, p):
    """ Get and parse a boolean value from request params. """
    val = params.pop(p, None)
    if not val:
        return False
    return val.lower() in ("yes", "1", "true")