refact request_is_valid? for reuse