cast dates to int only if request parameters actually exist.