You should check for it in the form before the query. I believe this is what request.items or request.values does.