if (valid_state($pull_downs) && $start_time < $end_time) { # okay; put processing here } else { # not okay: yell at user. }