def parse_params_int(params, p):
    """ Get and parse an int value from request params. """
    val = params.pop(p, None)
    try:
        return int(val, 10)
    except ValueError:
        return None